Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remote-source with ssh pattern #156

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading