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

Check Windows version for LongPaths #3821

Merged
merged 5 commits into from
Dec 12, 2021

Conversation

jfastnacht
Copy link
Contributor

@jfastnacht jfastnacht commented Jan 14, 2020

Closes #2204

Copy link
Contributor

@Ash258 Ash258 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Registry operation is too much for this simple check
  • Function is overkill when you can almost inline it

Is there any way how to enable it for older windows versions?

lib/diagnostic.ps1 Outdated Show resolved Hide resolved
@jfastnacht
Copy link
Contributor Author

jfastnacht commented Jan 15, 2020

It's possible to use UNC (\\?\C:\ instead of C:\) paths, so there should be a way:

C:\Users\j.fastnacht\scoop\apps\puppet-bolt\1.45.0\_tmp\SourceDir\Puppet Labs\Bolt\lib\ruby\gems\2.5.0\gems\puppet-6.11.0\spec\fixtures\unit\pops\loaders\loaders\dependent_modules_with_metadata\modules\user\lib\puppet\functions\user
λ  New-Item -Path 'C:\Users\j.fastnacht\scoop\apps\puppet-bolt\1.45.0\_tmp\SourceDir\Puppet Labs\Bolt\lib\ruby\gems\2.5.0\gems\puppet-6.11.0\spec\fixtures\unit\pops\loaders\loaders\dependent_modules_with_metadata\modules\user\lib\puppet\functions\user\ruby_calling_puppet_init.rb' -ItemType File
New-Item : Ein Teil des Pfades "C:\Users\j.fastnacht\scoop\apps\puppet-bolt\1.45.0\_tmp\SourceDir\Puppet Labs\Bolt\lib\ruby\gems\2.5.0\gems\puppet-6.11.0\spec\fixtur es\unit\pops\loaders\loaders\dependent_modules_with_metadata\modules\user\lib\puppet\functions\user\ruby_calling_puppet_init.rb" konnte nicht gefunden werden.
In Zeile:1 Zeichen:1
+ New-Item -Path 'C:\Users\j.fastnacht\scoop\apps\puppet-bolt\1.45.0\_t ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (C:\Users\j.fast..._puppet_init.rb:String) [New-Item], DirectoryNotFoundException
    + FullyQualifiedErrorId : NewItemIOError,Microsoft.PowerShell.Commands.NewItemCommand

​C:\Users\j.fastnacht\scoop\apps\puppet-bolt\1.45.0\_tmp\SourceDir\Puppet Labs\Bolt\lib\ruby\gems\2.5.0\gems\puppet-6.11.0\spec\fixtures\unit\pops\loaders\loaders\dependent_modules_with_metadata\modules\user\lib\puppet\functions\user
λ  New-Item -Path '\\?\C:\Users\j.fastnacht\scoop\apps\puppet-bolt\1.45.0\_tmp\SourceDir\Puppet Labs\Bolt\lib\ruby\gems\2.5.0\gems\puppet-6.11.0\spec\fixtures\unit\pops\loaders\loaders\dependent_modules_with_metadata\modules\user\lib\puppet\functions\user\ruby_calling_puppet_init.rb' -ItemType File


    Verzeichnis: \\?\C:\Users\j.fastnacht\scoop\apps\puppet-bolt\1.45.0\_tmp\SourceDir\Puppet
    Labs\Bolt\lib\ruby\gems\2.5.0\gems\puppet-6.11.0\spec\fixtures\unit\pops\loaders\loaders\dependent_modules_with_metadata\modules\user\lib\puppet\functions\user


Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----       15.01.2020     10:52              0 ruby_calling_puppet_init.rb

But for me the low hanging fruit was to inform the user correctly about the LongPathsEnabled when using Windows prior to Win10 v1607.

Ash258 added a commit to Ash258/Scoop-Core that referenced this pull request Aug 21, 2020
@rashil2000 rashil2000 merged commit b966ca8 into ScoopInstaller:develop Dec 12, 2021
niheaven added a commit that referenced this pull request Dec 25, 2021
Related PRs:
- #4531 @filmor 
  - ac71fcc @niheaven 
- #4535 @rashil2000 
- #4522 @pratikpc 
- #4550 @niheaven 
- #4528 @niheaven 
- #4532 @MrNuggelz
- #4155 @MrNuggelz Co-authored-by: @rashil2000 
  - #4581 @niheaven 
  - fb496c4 @rashil2000 
- #4543 @rashil2000 Co-authored-by: @niheaven 
  - #4555 @rashil2000 
  - 3c90d1a @rashil2000 
  - 2ec00d5 @rashil2000 
- #4567 @rashil2000 
  - cbe29ed @rashil2000 
- #4570 @niheaven 
  - #4582 @niheaven 
- #4571 @niheaven 
- #3244 @nickbudi 
- #3821 @jfastnacht Co-authored-by: @rasa 
- #4578 @tukanos
- #4579 @rashil2000 

Co-authored-by: Hsiao-nan Cheung <[email protected]>
Co-authored-by: Rashil Gandhi <[email protected]>
Co-authored-by: Jakub Čábera <[email protected]>
Co-authored-by: Ross Smith II <[email protected]>
Co-authored-by: Benedikt Reinartz <[email protected]>
Co-authored-by: Joris <[email protected]>
Co-authored-by: Pratik Chowdhury <[email protected]>
Co-authored-by: Rashil Gandhi <[email protected]>
Co-authored-by: nickbudi <[email protected]>
Co-authored-by: Julian <[email protected]>
Co-authored-by: tukanos <[email protected]>
se35710 pushed a commit to se35710/scoop that referenced this pull request Mar 8, 2022
* Added the check for the Windows version.

* Apply suggestions from code review

Co-Authored-By: Jakub Čábera <[email protected]>

* Additional lines added by GitHubs suggestion system removed. Function for the version check removed. If-condition adjusted to check for Major and Build version.

* TIL Windows 8.1 = major version 6, Windows 10 = major version 10.

* Update diagnostic.ps1

Co-authored-by: Jakub Čábera <[email protected]>
Co-authored-by: Ross Smith II <[email protected]>
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

Successfully merging this pull request may close these issues.

5 participants