Skip to content

Commit

Permalink
fix: remote-source with ssh pattern (#156)
Browse files Browse the repository at this point in the history
Signed-off-by: gabriel-farache <[email protected]>
  • Loading branch information
gabriel-farache authored Dec 22, 2023
1 parent dc14c8d commit 8779288
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/filesystem/filesystem.go
Original file line number Diff line number Diff line change
Expand Up @@ -2206,8 +2206,8 @@ func validateAndProcessPlan(plan string, shouldProcess bool) (string, error) {
return "", fmt.Errorf("'spec.sourceDir' is missing from the plan")
} else if pSpecSourceDir, ok := pSpecSourceDirI.(string); !ok {
return "", fmt.Errorf("'spec.sourceDir' is not a string. Actual value is %+v of type %T", pSpecSourceDirI, pSpecSourceDirI)
} else if pSpecSourceDir != SOURCES_DIR && pSpecSourceDir != "" && !strings.HasPrefix(pSpecSourceDir, "git+https://") {
return "", fmt.Errorf("'spec.sourceDir' is invalid. Expected 'source' or 'git+https://<remote repo url> . Actual: %s", pSpecSourceDir)
} else if pSpecSourceDir != SOURCES_DIR && pSpecSourceDir != "" && !strings.HasPrefix(pSpecSourceDir, "git+") {
return "", fmt.Errorf("'spec.sourceDir' is invalid. Expected 'source' or 'git+[https|ssh]://<remote repo url> . Actual: %s", pSpecSourceDir)
} else {
// TODO: better processing of the plan
pMeta["name"], _ = common.NormalizeName(pMetaName)
Expand Down Expand Up @@ -2333,7 +2333,7 @@ func (fs *FileSystem) runPlan(currentRunDir string, currentRunConfigPaths []stri
}
// update state
logrus.Debug("planning finished. inside Update. just before update start")
if strings.HasPrefix(currentRunSrcDir, "git+https://") {
if strings.HasPrefix(currentRunSrcDir, "git+") {
project.Status[types.ProjectStatusRemoteInputSources] = true
}
project.Status[types.ProjectStatusPlanning] = false
Expand Down

0 comments on commit 8779288

Please sign in to comment.