Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Shims break START /WAIT behaviour for executables #6215

Open
regystro opened this issue Nov 1, 2024 · 2 comments
Open

[Bug] Shims break START /WAIT behaviour for executables #6215

regystro opened this issue Nov 1, 2024 · 2 comments
Labels

Comments

@regystro
Copy link

regystro commented Nov 1, 2024

Bug Report

I'm opening this report here instead of the "extras" package because I think it's not package specific, but generic shim behaviour.

Current Behavior

When calling the executable without full path (therefore shim is used), it doesn't respect START /WAIT command.

Both WizTree and Everything support START /WAIT in order to force waiting until the execution is finished. Useful in batch files if you need to perform sequential commands and expect the exe to finish before. Example:

START /WAIT "Indexing..." WizTree64.exe "C:" /export="C.csv"
echo DONE

In this example, it doesn't wait for WizTree to finish indexing and immediately executes the next batch line.

Expected Behavior

The shim should pass the correct "context" to the executable, in order to wait until the task is done,

Additional context/output

The same happens with Everyting package, so it seems shim related.

Possible Solution

As of now, the only solution I've found is to bypass the shim and directly call the package executable, this way:

rem get WizTree.exe path
for /f "usebackq delims=" %%p in (`powershell -Command "& {scoop which wiztree} | Convert-Path"`) do set wiztreepath=%%p
START /WAIT "Indexing..." %wiztreepath% "C:" /export="C.csv"
echo DONE

System details

Windows version: 10. Also tested in 11

OS architecture: 64bit

PowerShell version:

Major  Minor  Build  Revision
-----  -----  -----  --------
5      1      19041  5007

Scoop Configuration

{
    "last_update":  "2024-10-30T10:41:29.4524387+01:00",
    "scoop_branch":  "master",
    "scoop_repo":  "https://github.com/lukesampson/scoop"
}
@regystro regystro added the bug label Nov 1, 2024
@FreeHarry
Copy link

I think this is similar to #6225

@skaravos
Copy link

This is indeed quite annoying.

I noticed that the other available shim.exe bundled with scoop doesn't seem to have this problem. So as a temporary workaround you could do:

scoop config shim 71
scoop reset *

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants