Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Command] warden env command #816

Closed
ihor-sviziev opened this issue Nov 4, 2024 · 3 comments · Fixed by #817
Closed

[Command] warden env command #816

ihor-sviziev opened this issue Nov 4, 2024 · 3 comments · Fixed by #817
Labels
bug Something isn't working

Comments

@ihor-sviziev
Copy link
Contributor

Version of Warden

0.14.3

Operating System and Installation Method

Mac OS 15.1 via Brew

Describe the Bug

When running a warden env up command, it's printing a

To Reproduce

  1. Install latest mutagen version (0.18.0 in my case)
  2. Run warden env up

Actual result

You see a warnings in the output:

$ warden env  up
Connecting traefik to myproject_default network
Connecting tunnel to myproject_default network
Connecting mailhog to myproject_default network
[+] Running 7/0
 ✔ Container myproject-db-1             Running                               0.0s
 ✔ Container myproject-opensearch-1  Running                               0.0s
 ✔ Container myproject-redis-1          Running                               0.0s
 ✔ Container myproject-php-fpm-1        Runni...                              0.0s
 ✔ Container myproject-nginx-1          Running                               0.0s
 ✔ Container myproject-php-debug-1      Run...                                0.0s
 ✔ Container myproject-varnish-1        Runni...                              0.0s
/opt/homebrew/Cellar/warden/0.14.3/commands/env.cmd: line 220: [[: 0018000000: value too great for base (error token is "0018000000")
/opt/homebrew/Cellar/warden/0.14.3/commands/env.cmd: line 220: [[: 0018000000: value too great for base (error token is "0018000000")
/opt/homebrew/Cellar/warden/0.14.3/commands/env.cmd: line 220: [[: 0018000000: value too great for base (error token is "0018000000")
/opt/homebrew/Cellar/warden/0.14.3/commands/env.cmd: line 220: [[: 0018000000: value too great for base (error token is "0018000000")
Created session sync_gWgOnEsgekO8WZZBXYHcZzv0LnOdWDjWuTUFWJK5xeU
Waiting for initial synchronization to complete
.............

Expected Behavior

You should not see any warnings

Additional context

No response

@ihor-sviziev ihor-sviziev added the bug Something isn't working label Nov 4, 2024
@navarr
Copy link
Member

navarr commented Nov 4, 2024

Could you also please advise your mutagen and bash versions? I haven't been able to recreate this one yet (it was reported last week, too) which makes it hard to know if a fix will work.

If you're feeling enterprising, would you be able to test these stack overflow solutions? https://stackoverflow.com/a/24777667/43790 - if it fixes it for you, and doesn't break anything for me, we'll roll with it

@ihor-sviziev
Copy link
Contributor Author

I have a ZSH 5.9 + oh-my-zsh (just updated to latest version.

$ zsh --version
zsh 5.9 (arm64-apple-darwin24.0)

About bash version:

$ bash --version
GNU bash, version 3.2.57(1)-release (arm64-apple-darwin24)
Copyright (C) 2007 Free Software Foundation, Inc.

I can test it by the following commands:

function version {
  echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1, $2, $3, $4); }'
}

if [[ $(version "0.18.0") -ge $(version '0.15.0') ]]; then
  echo 'success'
else
  echo 'fail'
fi

In bash, it fails:
image
while in zsh it's passing
image

@ihor-sviziev
Copy link
Contributor Author

@navarr I noticed that this option works fine for me:

function version {
  echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1, $2, $3, $4); }'
}

if [[ $((10#$(version "0.18.0"))) -ge $((10#$(version "0.15.0"))) ]]; then
  echo 'success'
else
  echo 'fail'
fi

Based on this, I created pull request #817

@github-project-automation github-project-automation bot moved this to ✅ Done in Warden Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants