Skip to content

Commit a59a39f

Browse files
Same method of extraction on Windows & Unixes
1 parent 14a7111 commit a59a39f

File tree

1 file changed

+5
-15
lines changed

1 file changed

+5
-15
lines changed

pkg/sdk.go

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -151,22 +151,12 @@ func (s SDK) unpackDispatcher() error {
151151
return err
152152
}
153153

154-
// On Windows host, we cannot execute .sh script, so extract archive manually
155-
if osx.IsWindows() {
156-
log.Infof("extracting SDK dispatcher tools from Makeself script '%s' to dir '%s'", script, s.DispatcherDir())
157-
if err := filex.UnarchiveMakeself(script, s.DispatcherDir()); err != nil {
158-
return fmt.Errorf("cannot extract SDK dispatcher tools from Makeself script '%s': %w", script, err)
159-
}
160-
log.Infof("extracted SDK dispatcher tools from Makeself script '%s' to dir '%s'", script, s.DispatcherDir())
161-
} else {
162-
log.Infof("unpacking SDK dispatcher tools using script '%s' to dir '%s'", script, s.DispatcherDir())
163-
cmd := execx.CommandShell([]string{script, "--target", s.DispatcherDir()})
164-
s.vendorManager.aem.CommandOutput(cmd)
165-
if err := cmd.Run(); err != nil {
166-
return fmt.Errorf("cannot run SDK dispatcher tools unpacking script '%s': %w", script, err)
167-
}
168-
log.Infof("unpacked SDK dispatcher tools using script '%s' to dir '%s'", script, s.DispatcherDir())
154+
log.Infof("extracting SDK dispatcher tools from self-extracting script '%s' to dir '%s'", script, s.DispatcherDir())
155+
if err := filex.UnarchiveMakeself(script, s.DispatcherDir()); err != nil {
156+
return fmt.Errorf("cannot extract SDK dispatcher tools from self-extracting script '%s': %w", script, err)
169157
}
158+
log.Infof("extracted SDK dispatcher tools from self-extracting script '%s' to dir '%s'", script, s.DispatcherDir())
159+
170160
}
171161
return nil
172162
}

0 commit comments

Comments
 (0)