Skip to content

Commit 8779288

Browse files
fix: remote-source with ssh pattern (#156)
Signed-off-by: gabriel-farache <[email protected]>
1 parent dc14c8d commit 8779288

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

internal/filesystem/filesystem.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -2206,8 +2206,8 @@ func validateAndProcessPlan(plan string, shouldProcess bool) (string, error) {
22062206
return "", fmt.Errorf("'spec.sourceDir' is missing from the plan")
22072207
} else if pSpecSourceDir, ok := pSpecSourceDirI.(string); !ok {
22082208
return "", fmt.Errorf("'spec.sourceDir' is not a string. Actual value is %+v of type %T", pSpecSourceDirI, pSpecSourceDirI)
2209-
} else if pSpecSourceDir != SOURCES_DIR && pSpecSourceDir != "" && !strings.HasPrefix(pSpecSourceDir, "git+https://") {
2210-
return "", fmt.Errorf("'spec.sourceDir' is invalid. Expected 'source' or 'git+https://<remote repo url> . Actual: %s", pSpecSourceDir)
2209+
} else if pSpecSourceDir != SOURCES_DIR && pSpecSourceDir != "" && !strings.HasPrefix(pSpecSourceDir, "git+") {
2210+
return "", fmt.Errorf("'spec.sourceDir' is invalid. Expected 'source' or 'git+[https|ssh]://<remote repo url> . Actual: %s", pSpecSourceDir)
22112211
} else {
22122212
// TODO: better processing of the plan
22132213
pMeta["name"], _ = common.NormalizeName(pMetaName)
@@ -2333,7 +2333,7 @@ func (fs *FileSystem) runPlan(currentRunDir string, currentRunConfigPaths []stri
23332333
}
23342334
// update state
23352335
logrus.Debug("planning finished. inside Update. just before update start")
2336-
if strings.HasPrefix(currentRunSrcDir, "git+https://") {
2336+
if strings.HasPrefix(currentRunSrcDir, "git+") {
23372337
project.Status[types.ProjectStatusRemoteInputSources] = true
23382338
}
23392339
project.Status[types.ProjectStatusPlanning] = false

0 commit comments

Comments
 (0)