Skip to content

Commit

Permalink
Merge pull request #84 from DireLines/main
Browse files Browse the repository at this point in the history
fix:  return new error if no net volumes; clean makefile
  • Loading branch information
DireLines authored Feb 6, 2024
2 parents 7651e76 + ec741d8 commit d9c1a92
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion cmd/project/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package project

import (
"cli/api"
"errors"
"fmt"
"os"
"strings"
Expand Down Expand Up @@ -62,7 +63,7 @@ func selectNetworkVolume() (networkVolumeId string, err error) {
if len(networkVolumes) == 0 {
fmt.Println("You do not have any network volumes.")
fmt.Println("Please create a network volume (https://runpod.io/console/user/storage) and try again.")
return "", err
return "", errors.New("account has no network volumes")
}
promptTemplates := &promptui.SelectTemplates{
Label: inputPromptPrefix + "{{ . }}",
Expand Down
11 changes: 6 additions & 5 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
.PHONY: proto

build-linux:
env GOOS=linux GOARCH=amd64 go build -ldflags "-X 'main.Version=1.0.0'" -o bin/runpodctl .
local:
go build -ldflags "-X 'main.Version=1.0.0'" -o bin/runpodctl .

dev:
linux:
env GOOS=linux GOARCH=amd64 go build -ldflags "-X 'main.Version=1.0.0'" -o bin/runpodctl .
mac:
env GOOS=darwin GOARCH=arm64 go build -ldflags "-X 'main.Version=1.0.0'" -o bin/runpodctl .
windows:
env GOOS=windows GOARCH=amd64 go build -ldflags "-X 'main.Version=1.0.0'" -o bin/runpodctl.exe .

dev-amd64:
mac-amd64:
env GOOS=darwin GOARCH=amd64 go build -ldflags "-X 'main.Version=1.0.0'" -o bin/runpodctl .


Expand Down

0 comments on commit d9c1a92

Please sign in to comment.