Skip to content

Commit

Permalink
quote fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
h4ck3rk3y committed Mar 18, 2024
1 parent 29cd7d0 commit 72538df
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -773,9 +773,9 @@ func createStartServiceOperation(
func handleFilesToBeMovedForDockerCompose(ctx context.Context, dockerManager *docker_manager.DockerManager, containerImageName string, cmdArgs []string, entrypointArgs []string, filesToBeMoved map[string]string) ([]string, []string, error) {
concatenatedFilesToBeMoved := []string{}
for source, destination := range filesToBeMoved {
sourceDir := path.Dir(source)
sourceDir := path.Dir(source) + "/*"
// TODO improve this; the first condition handles files the other folders
concatenatedFilesToBeMoved = append(concatenatedFilesToBeMoved, fmt.Sprintf("(mv %v %v || mv %v/* %v)", strconv.Quote(source), strconv.Quote(destination), strconv.Quote(sourceDir), strconv.Quote(destination)))
concatenatedFilesToBeMoved = append(concatenatedFilesToBeMoved, fmt.Sprintf("(mv %v %v || mv %v %v)", strconv.Quote(source), strconv.Quote(destination), strconv.Quote(sourceDir), strconv.Quote(destination)))
}

concatenatedFilesToBeMovedAsStr := strings.Join(concatenatedFilesToBeMoved, " && ")
Expand Down

0 comments on commit 72538df

Please sign in to comment.