surfcodes / surf-cli

https://github.surf
MIT License
6 stars 0 forks source link

surf.sh: 23: Bad substitution #3

Open sandikodev opened 3 years ago

sandikodev commented 3 years ago
/usr/local/lib/node_modules/@bridged.xyz/surf/surf.sh: 3: [: unexpected operator
/usr/local/lib/node_modules/@bridged.xyz/surf/surf.sh: 3: [: unexpected operator
/usr/local/lib/node_modules/@bridged.xyz/surf/surf.sh: 3: [: unexpected operator
/usr/local/lib/node_modules/@bridged.xyz/surf/surf.sh: 23: Bad substitution
softmarshmallow commented 3 years ago

Can you describe more details?

We'll take a look right on.

sandikodev commented 3 years ago
(penv) (researchDev) ☁  owlabs  sudo npm install -g @bridged.xyz/surf                         
/usr/local/bin/surf -> /usr/local/lib/node_modules/@bridged.xyz/surf/surf.sh
+ @bridged.xyz/surf@0.0.4
added 20 packages from 19 contributors in 4.719s
(penv) (researchDev) ☁  owlabs  which surf
/usr/local/bin/surf
(penv) (researchDev) ☁  owlabs  whereis surf
surf: /usr/local/bin/surf
(penv) (researchDev) ☁  owlabs  $(which surf)
/usr/local/bin/surf: 3: [: unexpected operator
/usr/local/bin/surf: 3: [: unexpected operator
/usr/local/bin/surf: 3: [: unexpected operator
/usr/local/bin/surf: 23: Bad substitution
(penv) (researchDev) ☁  owlabs  

i've do fresh install and follow the instruction like above. and here shell what iam using:

(penv) (researchDev) ☁  Projects  echo $0
-zsh
(penv) (researchDev) ☁  Projects  busybox | head -1       
BusyBox v1.30.1 (Ubuntu 1:1.30.1-4ubuntu6.3) multi-call binary.
(penv) (researchDev) ☁  Projects  $SHELL --version    
zsh 5.8 (x86_64-ubuntu-linux-gnu)
(penv) (researchDev) ☁  Projects  
(penv) (researchDev) ☁  Projects  
sandikodev commented 3 years ago

after editing what's interpreter(shebang) must be used /usr/local/lib/node_modules/@bridged.xyz/surf/surf.sh

#!/bin/bash

if [ "$1" == "" ] || [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
    echo ""

it's run perfectly

☁  owlabs [master] ⚡  git init
Reinitialized existing Git repository in /home/dev/Documents/PlatformIO/Projects/owlabs/.git/
☁  owlabs [master] ⚡  surf .
/usr/local/bin/surf: line 23: ROUTE_SIZE-4: substring expression < 0
Opening in existing browser session.
☁  owlabs [master] ⚡  surf  

---------------------Github Surf 🏄‍♂️-------------------

Development By @Bridged
📮 Report To https://github.com/bridgedxyz/surf-cli/issues

---------------------Command List---------------------

surf -h, surf --help, surf : Show Command List
surf .                     : Open Current Directory
surf ..                    : Open Current Directory Use Visual Studio Code
surf . -b <branch-name>    : Open Current Directory + Other Branch

but then, idont really know what still missing here

☁  owlabs [master] ⚡  surf .                                                        
/usr/local/bin/surf: line 23: ROUTE_SIZE-4: substring expression < 0
Opening in existing browser session.

my $PWD folder did'n commingup yet :/ or i must git pull/git push them first on git repos?

GwonHeeJun commented 3 years ago

Thanks your comment

스크린샷 2021-02-17 오전 1 51 10

I'm willing to reflect that part! Do you want me to revise it and reflect it? Or do you want to send we a PR?

nicoandmee commented 3 years ago

Can confirm I also experience this issue, and indeed changing shebang to #!/bin/bash fixes it.