Skip to content

Check Windows version for LongPaths#3821

Merged
rashil2000 merged 5 commits intoScoopInstaller:developfrom
jfastnacht:check-windows-version
Dec 12, 2021
Merged

Check Windows version for LongPaths#3821
rashil2000 merged 5 commits intoScoopInstaller:developfrom
jfastnacht:check-windows-version

Conversation

@jfastnacht
Copy link
Copy Markdown
Contributor

@jfastnacht jfastnacht commented Jan 14, 2020

Closes #2204

Copy link
Copy Markdown
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?

Comment thread lib/diagnostic.ps1 Outdated
@jfastnacht
Copy link
Copy Markdown
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.

jfastnacht and others added 4 commits January 15, 2020 11:03
Co-Authored-By: Jakub Čábera <cabera.jakub@gmail.com>
… for the version check removed. If-condition adjusted to check for Major and Build version.
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 <niheaven@gmail.com>
Co-authored-by: Rashil Gandhi <46838874+rashil2000@users.noreply.github.com>
Co-authored-by: Jakub Čábera <cabera.jakub@gmail.com>
Co-authored-by: Ross Smith II <ross@smithii.com>
Co-authored-by: Benedikt Reinartz <filmor@gmail.com>
Co-authored-by: Joris <MrNuggelz@users.noreply.github.com>
Co-authored-by: Pratik Chowdhury <pratikc@live.co.uk>
Co-authored-by: Rashil Gandhi <rashil2000@gmail.com>
Co-authored-by: nickbudi <nickbudi@users.noreply.github.com>
Co-authored-by: Julian <github@fastnacht.consulting>
Co-authored-by: tukanos <patrik.svestka@gmail.com>
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 <cabera.jakub@gmail.com>

* 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 <cabera.jakub@gmail.com>
Co-authored-by: Ross Smith II <ross@smithii.com>
se35710 pushed a commit to se35710/scoop that referenced this pull request Mar 8, 2022
Related PRs:
- ScoopInstaller#4531 @filmor
  - ac71fcc @niheaven
- ScoopInstaller#4535 @rashil2000
- ScoopInstaller#4522 @pratikpc
- ScoopInstaller#4550 @niheaven
- ScoopInstaller#4528 @niheaven
- ScoopInstaller#4532 @MrNuggelz
- ScoopInstaller#4155 @MrNuggelz Co-authored-by: @rashil2000
  - ScoopInstaller#4581 @niheaven
  - fb496c4 @rashil2000
- ScoopInstaller#4543 @rashil2000 Co-authored-by: @niheaven
  - ScoopInstaller#4555 @rashil2000
  - 3c90d1a @rashil2000
  - 2ec00d5 @rashil2000
- ScoopInstaller#4567 @rashil2000
  - cbe29ed @rashil2000
- ScoopInstaller#4570 @niheaven
  - ScoopInstaller#4582 @niheaven
- ScoopInstaller#4571 @niheaven
- ScoopInstaller#3244 @nickbudi
- ScoopInstaller#3821 @jfastnacht Co-authored-by: @rasa
- ScoopInstaller#4578 @tukanos
- ScoopInstaller#4579 @rashil2000

Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
Co-authored-by: Rashil Gandhi <46838874+rashil2000@users.noreply.github.com>
Co-authored-by: Jakub Čábera <cabera.jakub@gmail.com>
Co-authored-by: Ross Smith II <ross@smithii.com>
Co-authored-by: Benedikt Reinartz <filmor@gmail.com>
Co-authored-by: Joris <MrNuggelz@users.noreply.github.com>
Co-authored-by: Pratik Chowdhury <pratikc@live.co.uk>
Co-authored-by: Rashil Gandhi <rashil2000@gmail.com>
Co-authored-by: nickbudi <nickbudi@users.noreply.github.com>
Co-authored-by: Julian <github@fastnacht.consulting>
Co-authored-by: tukanos <patrik.svestka@gmail.com>
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