Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gvkhna committed May 30, 2024
1 parent 284c1f0 commit 413b836
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions cli/cmd/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/gvkhna/warpdive/dive"
"github.com/gvkhna/warpdive/runtime"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)

var pushCmd = &cobra.Command{
Expand Down Expand Up @@ -60,10 +59,10 @@ func doPushCmd(cmd *cobra.Command, args []string) {
sourceType, imageStr = dive.DeriveImageSource(userImage)

if sourceType == dive.SourceUnknown {
sourceStr := viper.GetString("source")
sourceType = dive.ParseImageSource(sourceStr)
// sourceStr := viper.GetString("source")
sourceType = dive.ParseImageSource(defaultSource)
if sourceType == dive.SourceUnknown {
fmt.Printf("unable to determine image source: %v\n", sourceStr)
fmt.Printf("unable to determine image source: %v\n", defaultSource)
os.Exit(1)
}

Expand Down
4 changes: 2 additions & 2 deletions cli/runtime/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ func run(enableUi bool, options Options, imageResolver image.Resolver, events ev
// Use default endpoint if not specified
if warpDiveEndpoint == "" {
warpDiveEndpoint = "https://www.warpdive.xyz"
log.Printf("WARPDIVE_ENDPOINT not set. Using default: %s", warpDiveEndpoint)
warpDiveLogger.Printf("WARPDIVE_ENDPOINT not set. Using default: %s", warpDiveEndpoint)
} else {
log.Printf("Using WARPDIVE_ENDPOINT: %s", warpDiveEndpoint)
}
Expand All @@ -738,7 +738,7 @@ func run(enableUi bool, options Options, imageResolver image.Resolver, events ev
}
}

fmt.Printf("Successfully loaded configuration: Endpoint %s, API Key %s\n", warpDiveEndpoint, warpDiveAPIKey)
warpDiveLogger.Printf("Successfully loaded configuration: Endpoint %s, API Key %s\n", warpDiveEndpoint, warpDiveAPIKey)
// Parse the endpoint URL
parsedUrl, err := url.Parse(warpDiveEndpoint)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cli/warpdive/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function getBinaryPath() {
}
}

function runBinary(...args) {
function runBinary(args) {
// Skip downloading the binary if it was already installed via optionalDependencies
if (!isPlatformSpecificPackageInstalled()) {
if (isFallbackBinaryInstalled()) {
Expand Down

0 comments on commit 413b836

Please sign in to comment.