wardenenv/warden

[Command] warden env command

Closed this issue · 3 comments

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

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

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

@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