`Split-Path /` should not throw error
See original GitHub issueSteps to reproduce
Split-Path /
Expected behavior
Empty string, like Split-Path C:
Actual behavior
Split-Path : Cannot process argument because the value of argument "path" is not valid. Change the value of the "path" argument and run the operation again.
At line:1 char:1
+ Split-Path /
+ ~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Split-Path], PSArgumentException
+ FullyQualifiedErrorId : Argument,Microsoft.PowerShell.Commands.SplitPathCommand
Environment data
Name Value
---- -----
PSVersion 7.0.0-preview.1
PSEdition Core
GitCommitId 7.0.0-preview.1
OS Darwin 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Getting Uncaught TypeError: path.split is not a function in ...
I'm trying to do validations for my form in react. I chose "react-hook-form" library. But I'm constantly getting error "Path.split is not a ......
Read more >Error with PCLauncher - RLDLL.splitPath - Exception ...
Hi All, having some problems setting up the PCLauncher with a LNK shortcut file. File runs fine when double clicked but I cannot...
Read more >Split-Path - PowerShell
The Split-Path cmdlet returns only the specified part of a path, such as the parent folder ... It does not return FileInfo objects...
Read more >How to Split Paths with the PowerShell Split-Path Cmdlet
Learn how to split and return different elements of a path using the PowerShell Split-Path cmdlet in this tutorial.
Read more >SplitPath - Syntax & Usage
The SplitPath command separates a file name or URL into its name, directory, extension, and drive.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@vors How strange. This only seems to happen in *nix systems. On Windows, (core or desktop) it quietly returns an empty string. This does seem like a bug.
The same on Windows:
@TylerLeonhardt It seems ok for hackathon because we see the same behavior on all platforms for root.