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

The term 'attrib' is not recognized on win 10 #3238

Closed
sfengyuan opened this issue Mar 18, 2019 · 5 comments
Closed

The term 'attrib' is not recognized on win 10 #3238

sfengyuan opened this issue Mar 18, 2019 · 5 comments

Comments

@sfengyuan
Copy link

win 10

OS Version:                10.0.17763 N/A Build 17763

scoop

Current Scoop version:
ebf69b69 (HEAD -> master, origin/master, origin/HEAD) ack: Update to version 2.26

Powershell

Name                           Value
----                           -----
PSVersion                      5.1.17763.316
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.17763.316
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

run scoop install hugo got this

hugo_0.54.0_windows-64bit.zip (7.4 MB) [======================================================================] 100%
Checking hash of hugo_0.54.0_windows-64bit.zip ... ok.
Extracting hugo_0.54.0_windows-64bit.zip ... done.
Linking ~\scoop\apps\hugo\current => ~\scoop\apps\hugo\0.54.0
attrib : The term 'attrib' is not recognized as the name of a cmdlet, function, script file, or operable program. Check
 the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\sensu\scoop\apps\scoop\current\lib\install.ps1:982 char:5
+     attrib $currentdir +R /L
+     ~~~~~~
    + CategoryInfo          : ObjectNotFound: (attrib:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Creating shim for 'hugo'.
@chawyehsu
Copy link
Member

Make sure C:\Windows\system32 is in your system PATH, and C:\Windows\system32\attrib.exe is accessible from command line.

@sfengyuan
Copy link
Author

I have never know that system32 need to manually add. What is going on with windows? I wish I don't need to add c:\Windows in future.

@suiyun39
Copy link

@chawyehsu Maybe should use $env:SystemRoot + '\System32\attrib.exe', Instead of calling it directly.

@gianluca-sabena
Copy link

I suggest to move this check inside scoop directly.
As of today installing python failed for this reason.

@HUMORCE
Copy link
Member

HUMORCE commented Aug 11, 2023

The fact: you are running a broken/modded OS, or they are removed/modified by any reason/factor.

%SystemRoot% and %SystemRoot%\system32 are default values of PATH in Windows XP/Vista/7/8/10/11. Equivalent to /sbin (/usr/sbin) in *nix.

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

No branches or pull requests

5 participants