Skip to content

Commit

Permalink
try "sh"
Browse files Browse the repository at this point in the history
> /bin/bash: bad interpreter: Text file busy

github ci fails

Signed-off-by: Gyuho Lee <[email protected]>
  • Loading branch information
gyuho committed Aug 21, 2024
1 parent 169c726 commit 84a7d5b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pkg/process/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func New(commands [][]string, opts ...OpOption) (Process, error) {
defer func() {
_ = bashFile.Sync()
}()
cmdArgs = []string{"bash", "-c", bashFile.Name()}
cmdArgs = []string{"sh", "-c", bashFile.Name()}
}

for _, args := range commands {
Expand All @@ -104,10 +104,6 @@ func New(commands [][]string, opts ...OpOption) (Process, error) {
if err := bashFile.Chmod(0755); err != nil {
return nil, fmt.Errorf("failed to set executable permission on bash script: %w", err)
}
cmd := exec.Command("chmod", "+x", bashFile.Name())
if err := cmd.Run(); err != nil {
return nil, fmt.Errorf("failed to run chmod +x on bash script: %w", err)
}
}

return &process{
Expand Down

0 comments on commit 84a7d5b

Please sign in to comment.