Skip to content

Commit

Permalink
fix(server/runner): add space in && in GetCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
nedpals committed Mar 26, 2024
1 parent 2fa4cf0 commit db0861b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func GetCommand(languageId string, filePath string) (string, error) {
"${fileNoExt}", strings.TrimSuffix(filePath, filepath.Ext(filePath)),
)

runCommandStr := r.Replace(strings.Join(runCommand, "&&"))
runCommandStr := r.Replace(strings.Join(runCommand, " && "))
if strings.Count(runCommandStr, "||") > 0 || strings.Count(runCommandStr, "&&") > 0 {
// wrap the command in double quotes if it contains logical operators
runCommandStr = fmt.Sprintf("\"%s\"", runCommandStr)
Expand Down

0 comments on commit db0861b

Please sign in to comment.