# Cannot publish an executable

**URL:** <https://discourse.flox.dev/t/cannot-publish-an-executable/733>\
**Category:** Bug Reports\
**Created:** [April 20, 2023, 2:59pm UTC](https://discourse.flox.dev/t/cannot-publish-an-executable/733 "2023-04-20T14:59:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![etorreborre](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/etorreborre/32/428_2.png) [@etorreborre](https://discourse.flox.dev/u/etorreborre)\
**Post date:** [April 20, 2023, 2:59pm UTC](https://discourse.flox.dev/t/cannot-publish-an-executable/733/1 "2023-04-20T14:59:34Z")

</div>

Hi, I am trying to publish a simple package: [GitHub - etorreborre/chatgpt\_rust: chatgpt\_rust executable](https://github.com/etorreborre/chatgpt_rust) but I am getting an error:

```auto
flox publish /nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/utils.sh: line 1372: shift: shift count out of range

```

and the debug session returns

```auto
[DEBUG] [flox::config] `$FLOX_CONFIG_HOME` not set, using "/Users/etorreborre/.config/flox/"
[DEBUG] [flox::config] `FLOX_CONFIG_HOME` not set, using "/Users/etorreborre/.config/flox/"
[DEBUG] [flox::utils::init::metrics] Attempting to read own UUID from file
[DEBUG] [flox::config::features] `FLOX_FEATURES_PUBLISH` unset or not "rust", falling back to legacy flox
[DEBUG] [flox] Running in flox with arguments: ["--debug", "publish"]
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/utils.sh:149 hash_commands( ansifilter awk basename bash cat chmod cmp column cp curl cut dasel date dirname getent gh git grep gum id jq ln man mkdir mktemp mv nix nix-editor nix-store pwd readlink realpath rm rmdir sed sh sleep sort stat tail tar tee touch tr uname uuid xargs zgrep )
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/utils.sh:169 first_in_PATH( vim vi nano emacs ed )
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/bootstrap.sh:25 floxUserMetaRegistry( get floxClientUUID )
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/utils.sh:699 registry( /var/folders/f1/z4ywgsbx7572r2wmslwy778w0000gn/T/tmp.sahdOr77vQ 1 get floxClientUUID )
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/utils.sh:611 invoke( /nix/store/3xxpk5nhfq92dx5kn63nknbzv9j49yk2-jq-1.6-bin/bin/jq -S -n -e -r -f /nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/registry.jq --arg version 1 --slurpfile registry /var/folders/f1/z4ywgsbx7572r2wmslwy778w0000gn/T/tmp.sahdOr77vQ --args -- get floxClientUUID )
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/bootstrap.sh:27 floxUserMetaRegistry( get floxClientUUID )
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/utils.sh:699 registry( /var/folders/f1/z4ywgsbx7572r2wmslwy778w0000gn/T/tmp.sahdOr77vQ 1 get floxClientUUID )
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/utils.sh:611 invoke( /nix/store/3xxpk5nhfq92dx5kn63nknbzv9j49yk2-jq-1.6-bin/bin/jq -S -n -e -r -f /nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/registry.jq --arg version 1 --slurpfile registry /var/folders/f1/z4ywgsbx7572r2wmslwy778w0000gn/T/tmp.sahdOr77vQ --args -- get floxClientUUID )
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/bootstrap.sh:34 floxUserMetaRegistry( get floxMetricsConsent )
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/utils.sh:699 registry( /var/folders/f1/z4ywgsbx7572r2wmslwy778w0000gn/T/tmp.sahdOr77vQ 1 get floxMetricsConsent )
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/utils.sh:611 invoke( /nix/store/3xxpk5nhfq92dx5kn63nknbzv9j49yk2-jq-1.6-bin/bin/jq -S -n -e -r -f /nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/registry.jq --arg version 1 --slurpfile registry /var/folders/f1/z4ywgsbx7572r2wmslwy778w0000gn/T/tmp.sahdOr77vQ --args -- get floxMetricsConsent )
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/bootstrap.sh:57 floxUserMetaRegistry( get educatePublish )
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/utils.sh:699 registry( /var/folders/f1/z4ywgsbx7572r2wmslwy778w0000gn/T/tmp.sahdOr77vQ 1 get educatePublish )
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/utils.sh:611 invoke( /nix/store/3xxpk5nhfq92dx5kn63nknbzv9j49yk2-jq-1.6-bin/bin/jq -S -n -e -r -f /nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/registry.jq --arg version 1 --slurpfile registry /var/folders/f1/z4ywgsbx7572r2wmslwy778w0000gn/T/tmp.sahdOr77vQ --args -- get educatePublish )
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/init.sh:350 updateFloxFlakeRegistry( )
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/utils.sh:1240 getChannelsJSON( )
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/utils.sh:1218 floxUserMetaRegistry( get channels )
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/utils.sh:699 registry( /var/folders/f1/z4ywgsbx7572r2wmslwy778w0000gn/T/tmp.sahdOr77vQ 1 get channels )
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/utils.sh:611 invoke( /nix/store/3xxpk5nhfq92dx5kn63nknbzv9j49yk2-jq-1.6-bin/bin/jq -S -n -e -r -f /nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/registry.jq --arg version 1 --slurpfile registry /var/folders/f1/z4ywgsbx7572r2wmslwy778w0000gn/T/tmp.sahdOr77vQ --args -- get channels )
trace:/dev/fd/63:1 invoke( /nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/libexec/flox/nix registry add --registry /Users/etorreborre/.config/flox/tmp.wZ7f9fmSDg etorreborre github:etorreborre/floxpkgs/main )
trace:/dev/fd/63:2 invoke( /nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/libexec/flox/nix registry add --registry /Users/etorreborre/.config/flox/tmp.wZ7f9fmSDg flox github:flox/floxpkgs/master )
trace:/dev/fd/63:3 invoke( /nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/libexec/flox/nix registry add --registry /Users/etorreborre/.config/flox/tmp.wZ7f9fmSDg nixpkgs-flox github:flox/nixpkgs-flox/master )
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/utils.sh:1247 invoke( /nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/libexec/flox/nix registry add --registry /Users/etorreborre/.config/flox/tmp.wZ7f9fmSDg nixpkgs github:flox/nixpkgs/stable )
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/utils.sh:1248 invoke( /nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/libexec/flox/nix registry add --registry /Users/etorreborre/.config/flox/tmp.wZ7f9fmSDg nixpkgs-stable github:flox/nixpkgs/stable )
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/utils.sh:1249 invoke( /nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/libexec/flox/nix registry add --registry /Users/etorreborre/.config/flox/tmp.wZ7f9fmSDg nixpkgs-staging github:flox/nixpkgs/staging )
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/utils.sh:1250 invoke( /nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/libexec/flox/nix registry add --registry /Users/etorreborre/.config/flox/tmp.wZ7f9fmSDg nixpkgs-unstable github:flox/nixpkgs/unstable )
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/libexec/flox/flox:132 submitMetric( publish )
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/libexec/flox/flox:266 floxPublish( )
trace:/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/commands/publish.sh:188 selectAttrPath( . publish )
/nix/store/bna0pb445rmw4q5cdgpclydia230qbhk-flox-0.0.10-r219/lib/utils.sh: line 1372: shift: shift count out of range

```

I am using the latest stable flox version

```auto
flox --version
Version: 0.1.4-r446-0.0.10-r224

```

What can I do? Thanks.

---

<div class="post-metadata">

**Author:** ![limeytexan](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/limeytexan/32/10_2.png) [@limeytexan](https://discourse.flox.dev/u/limeytexan)\
**Post date:** [April 20, 2023, 4:14pm UTC](https://discourse.flox.dev/t/cannot-publish-an-executable/733/2 "2023-04-20T16:14:19Z")

</div>

Hi Eric,

A few things:

1. I’m not seeing the full version in your output above - can you append that again? _ **Update** : Robin pointed out that the output is a super-wide text box and I needed to scroll all the way to the right!_
2. We just released a new version of flox in both the `flox/default` and `flox/prerelease` environments - can you pull the latest generation of one of the above and confirm the problem is still present in this latest release (0.1.4-r446-0.0.10-r224)? _ **Update** : please ignore per the above._
3. Can you try invoking `flox --bash-passthru publish` as a workaround?

Thanks!

---

<div class="post-metadata">

**Author:** ![etorreborre](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/etorreborre/32/428_2.png) [@etorreborre](https://discourse.flox.dev/u/etorreborre)\
**Post date:** [April 20, 2023, 5:07pm UTC](https://discourse.flox.dev/t/cannot-publish-an-executable/733/3 "2023-04-20T17:07:00Z")

</div>

Hi Michael,

(Yes I didn’t see that the version was not showing up in my message above).

I tried `flox --bash-passthru publish` but I am still getting the exact same error.

```auto
/nix/store/zgzwf8yyc16cqjmgzl0a5b3rf3zc13w0-flox-0.0.10-r224/lib/utils.sh: line 1372: shift: shift count out of range

```

---

<div class="post-metadata">

**Author:** ![aameen](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/aameen/32/564_2.png) [@aameen](https://discourse.flox.dev/u/aameen)\
**Post date:** [May 4, 2023, 5:00pm UTC](https://discourse.flox.dev/t/cannot-publish-an-executable/733/4 "2023-05-04T17:00:14Z")

</div>

Hey wanted to follow up and let you know that this bug has been fixed in our development branch and will be available soon in our next release.

Thanks for the report!

---

<div class="post-metadata">

**Author:** ![etorreborre](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/etorreborre/32/428_2.png) [@etorreborre](https://discourse.flox.dev/u/etorreborre)\
**Post date:** [May 4, 2023, 5:20pm UTC](https://discourse.flox.dev/t/cannot-publish-an-executable/733/5 "2023-05-04T17:20:52Z")

</div>

Woot, thank you Alex!
