You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This occurred on Windows 8.1 - Powershell, not sure if the problem also exists on Unix systems.
If you pass command line flags to your go executable which contains a file name, without putting it between parentheses, go silently drops the file ending.
Example:
.\myprog.exe -publicKey=test-key.pub
In the program, the variable was set to test-key and not test-key.pub.
Go should at least fail and not silently drop the file extension.
(Tried hours finding a bug in my code which alas wasn't there)
Edit 1:
There was a file test-key in the directory, so that's why my program didn't fail itself.
Edit 2:
As it seems to be a PowerShell specific problem, here the version I'm running:
Major Minor Build Revision
4 0 -1 -1
The text was updated successfully, but these errors were encountered:
I indeed can't reproduce this error with cmd.exe so it seems it's a PowerShell specific problem.
RitchieFlick
changed the title
cmd/go: Flag silently removes file ending when not between parentheses
cmd/go: PowerShell: Flag silently removes file ending when not between parentheses
Oct 12, 2015
This occurred on Windows 8.1 - Powershell, not sure if the problem also exists on Unix systems.
If you pass command line flags to your go executable which contains a file name, without putting it between parentheses, go silently drops the file ending.
Example:
In the program, the variable was set to test-key and not test-key.pub.
Go should at least fail and not silently drop the file extension.
(Tried hours finding a bug in my code which alas wasn't there)
Edit 1:
There was a file test-key in the directory, so that's why my program didn't fail itself.
Edit 2:
As it seems to be a PowerShell specific problem, here the version I'm running:
Major Minor Build Revision
4 0 -1 -1
The text was updated successfully, but these errors were encountered: