stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Bug]: webui.sh: 97: [[: not found

Open Goury opened this issue 2 years ago • 12 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What happened?

I run webui.sh, I get

$ sh ./webui.sh 
./webui.sh: 8: [[: not found
./webui.sh: 17: [[: not found
./webui.sh: 24: [[: not found
./webui.sh: 30: [[: not found
./webui.sh: 36: [[: not found
./webui.sh: 42: [[: not found
./webui.sh: 48: [[: not found
./webui.sh: 53: [[: not found

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################
./webui.sh: 85: [[: not found

################################################################
Running on goury user
################################################################
./webui.sh: 97: [[: not found

################################################################
ERROR:  is not installed, aborting...
################################################################
./webui.sh: 109: hash: : Permission denied

Please fix

Steps to reproduce the problem

  1. git pull
  2. sh ./webui.sh
  3. T_T

What should have happened?

It used to just work

Commit where the problem happens

82725f0ac439f7e3b67858d55900e95330bbd326

What platforms do you use to access UI ?

Linux

What browsers do you use to access the UI ?

No response

Command Line Arguments

No response

Additional information, context and logs

No response

Goury avatar Jan 14 '23 10:01 Goury

It works with bash, so please just rename it to webui.bash or just webui as it is very misleading now

Goury avatar Jan 14 '23 10:01 Goury

It works with bash, so please just rename it to webui.bash or just webui as it is very misleading now

Technically it should automatically call the script with bash, given the shebang (the #!/usr/bin/env bash) at the top. So when you execute the script via ./webui.sh it will automatically use bash to run it. Using sh webui.sh "forces" it to use sh to run it, which wouldn't work (similarly to if you were trying to use python to run it via python webui.sh). I do understand that the .sh extension kinda could be confusing sometimes.

atensity avatar Jan 23 '23 18:01 atensity

So why don't we call it webui.exe or webui.tar.gz? How's about webui.txt? Or webui.jpg?

Because if your goal is to confuse the user, it's not confusing enough. If not, just rename the damned file!

Goury avatar Jan 30 '23 16:01 Goury

You can make a PR to rename it, it's easy enough. I asked a few guys if this is how it's suppose to be with bash shebang and it is, but if you insist that it must be renamed - just do it and make a pull request.

mezotaken avatar Jan 30 '23 16:01 mezotaken

Sure thing, just don't close the issue until then. It shouldn't take long, I'll PR it as soon as I finish my workday.

Goury avatar Jan 30 '23 17:01 Goury

https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/7438
tests passed

Goury avatar Feb 01 '23 00:02 Goury

Frustration clarification:

  • When something's clearly wrong and you're "wontfix", it's frustrating to a point of inducing rage
  • But if you're "do it yourself", I'll just "sure can do"

I am a python web developer myself and I value software freedom higher than most things in existence. So I'll gladly fix stuff around here if you just affirm it and me being responsible for fixing it.

Goury avatar Feb 01 '23 00:02 Goury

I can't affirm anything, I'm basically just a user with wiki/issue list edit access. For it to be merged it has to go through AUTO, and somehow I suspect it won't pass.

mezotaken avatar Feb 01 '23 07:02 mezotaken

On my Ubuntu 18.04 system, "sh webui.sh" doesn't work, but "bash webui.sh" works.

qingguo-xu avatar Mar 11 '23 09:03 qingguo-xu

I'm using linux mint. For me, it's a permission problem. I just change the permission. sudo chmod +x webui.sh

then execute ./webui.sh

jarvisbutler492 avatar Nov 17 '23 06:11 jarvisbutler492

It works with bash, so please just rename it to webui.bash or just webui as it is very misleading now

useful! just bash webui.bash

tian-2024 avatar Jul 07 '24 08:07 tian-2024