Closed Tyecon closed 1 month ago
Renaming to ani-cli.exe does nothing
good effort 🫡
Not sure we can do anything here
@Tyecon, to run ani-cli are you double-clicking the ani-cli files?
Once you scoop install ani-cli
, to run ani-cli you simply need to type ani-cli
in your terminal and hit Enter
. This should work in any directory as scoop adds ani-cli to the Windows path.
You could also avoid opening the terminal to enter ani-cli by entering ani-cli in Run. Open Run with Win+R.
ani-cli is not intended to be double-clicked. @port19x, correct me if I'm wrong.
No, the things I've put in the code blocks are exactly what I'm entering in the terminal. Windows run dialogue does the same things. The shims folder is on the PATH env-var.
ani-cli
should work on cmd, powershell, pwsh, and bash (Git Bash).
Entering ani-cli
in cmd and powershell / pwsh should run the ~/scoop/shims/ani-cli.cmd cmd file.
Entering ani-cli
in bash should run the ~/scoop/shims/ani-cli sh file.
~/scoop/shims/ani-cli
will actually run ~/scoop/shims/ani-cli.cmd
in powershell / cmd.
You could test this by creating a file called test01.cmd with the line "dir" with this command: echo dir > test01.cmd
. Create a second file called test01 with the line "help" with this command: echo help > test01
. Run .\test01
. Observe that it runs the cmd file.
I think you get the Open-With dialog because your shell is trying to run the ~/scoop/shims/ani-cli file which is an sh file for bash. If you create a file called test02 with the line "ls" with the command echo ls > test02
, running .\test02
will open the Open-With dialog.
I'm guessing here, but it could be because of some access / permission issue or scoop was not set up right.
scoop uninstall ani-cli
followed by scoop install ani-cli
should do it.cd ~\scoop\shims\
followed by ani-cli
(without the .\
) output?ani-cli
work in Git Bash?~\scoop\shims\ani-cli
(to get it out of the way). Does ani-cli
work?The echo files will open-with with no suffix. With .cmd it seems that echo places an unknown character at the start that breaks it.
→ C:\Users\Tyecon\scoop\shims› echo dir > test01.cmd
→ C:\Users\Tyecon\scoop\shims› test01.cmd
C:\Users\Tyecon\scoop\shims>â– d
'â– d' is not recognized as an internal or external command,
operable program or batch file.
ani-cli
causes open-with, .\ani-cli
works normally.
→ C:\Users\Tyecon› cat ~/scoop/shims/ani-cli
#!/bin/sh
# C:\Users\Tyecon\scoop\apps\ani-cli\current\ani-cli
"C:\Users\Tyecon\scoop\apps\ani-cli\current\ani-cli" "$@"
→ C:\Users\Tyecon› cat ~/scoop/shims/ani-cli.cmd @rem C:\Users\Tyecon\scoop\apps\ani-cli\current\ani-cli @"C:\Program Files\Git\bin\bash.exe" "C:\Users\Tyecon\scoop\apps\ani-cli\current\ani-cli" %*
5. Renaming it to ani-cli.exe still has the open-with dialogue but trying to run it otherwise gives executable is not valid error. Renaming it to ani-cli.sh makes it act as it would without a suffix.
6. `sh ani-cli` works great, starts in it scoop/MINGW64.
I think I figured out that it's some oddity with my windows subsystem linux environment trying to run the sh scripts directly outside of bash. A lot of linux commands that normally wouldn't work in powershell work in mine because of WSL. So it's a shell script bug with WSL not ani-cli probably. I think some other programs I've used through scoop and choco just had different exe wrappers for it that worked.
Sorry, I guess echo dir > test01.cmd
would work in cmd.exe whereas echo dir > test01.ps1
would work in powershell.
A lot of linux commands that normally wouldn't work in powershell work in mine because of WSL. What is on your PATH that causes this?
scoop install MINGW
? I have WSL too but don't find this behavior. If you find out what causes this, a PR could be made to the ani-cli scoop package to account for this case.
You could try adding a ~\scoop\shims\ani-cli.ps1
file and see whether powershell prioritizes the ps1 file. Another simple approach would be to add an ani-cli
alias or function to your powershell profile so that the right ani-cli is run when you enter ani-cli
.
You could also try removing ~\scoop\shims\ani-cli
so only the cmd file would run (but then you couldn't use ani-cli in git bash).
Also, what is the output of Get-ExecutionPolicy
in powershell?
some oddity with my windows subsystem linux environment @Tyecon, I just saw this part. Please see the WSL installation guide if you are using ani-cli in WSL and uninstall ani-cli from Windows with scoop. If you're planning on using ani-cli on Windows, please see the updated Windows guide. Raise a new issue should the need arise.
OS: Windows 10 Shell: Powershell 5.1.19041 in Windows Terminal Ani-Cli Version: 4.8.0
Behaviours:
ani-cli
: Open-With Dialogue, no program does anything (tried cmd.exe, ps.exe, mpv)ani-cli.cmd
: Works as expected in powershell~\scoop\shims\ani-cli
: Opens in new cmd.exe window but works~\scoop\shims\ani-cli.cmd
: Works as expectedcd ~\scoop\shims\
then.\ani-cli
: Works as expected Renaming to ani-cli.exe does nothing. Other scoop based programs don't have this same behaviour. Various Set-ItemProperty settings don't seem to help (Read and Execute is true).Might just be something weird with my terminal, but I might as well post the workarounds to help anyone that comes across the strange behaviour.