Skip to content

Commit

Permalink
bugfix: Make sure the sdk version directory exists
Browse files Browse the repository at this point in the history
  • Loading branch information
aooohan committed Feb 4, 2024
1 parent 7e416c6 commit 576ada7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions internal/sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ func (b *Sdk) moveRemoteFile(info *Info, targetPath string) error {
func (b *Sdk) preInstallSdk(info *Info, sdkDestPath string) (string, error) {
pterm.Printf("Preinstalling %s...\n", info.label())
path := info.storagePath(sdkDestPath)
if !util.FileExists(path) {
if err := os.MkdirAll(path, 0755); err != nil {
return "", fmt.Errorf("failed to create directory, err:%w", err)
}
}
if info.Path == "" {
return path, nil
}
Expand Down

0 comments on commit 576ada7

Please sign in to comment.