-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Commands like add
and files write
don't detect pipes on Windows
#3266
Comments
Yes we have stdin piping explicitly disabled on windows, I don't know was is the reasoning behind it, but @whyrusleeping might know more about it. |
I think i recall the reason for this had something to do with stdin being much more difficult to handle on windows than on linux. Its explicitly disabled here: https://github.com/ipfs/go-ipfs/blob/master/commands/cli/parse.go#L258 @mateon1 feel free to experiment with that, if you find that everything works just fine, then please do PR a removal of that special casing. |
A more descriptive error message would be useful, particularly because this affects the getting started tutorial. Also, this is likely only necessary for the Windows console, since Cygwin's bash is from the same source as everyone elses'. |
@dysbulic good point, we should check what shell we're in instead of just checking operating system here |
Cygwin console works by recompiling everything with linux'y libc and it is the reason why stdin is sane then but I have no idea how will Go stdin handling behave then if it isn't sane on Windows. It seems to me that we have to rediscover the reason why stdin handling was disabled on Windows in the first place, maybe it can be re-enabled without any problems. |
@Kubuxu I think the original reason it was disabled was because it didnt work properly on windows cmd.exe |
Version information:
go-ipfs version: 0.4.4-dev-73cd8b3
Repo version: 4
System version: amd64/windows
Golang version: go1.7
Type: Bug
Priority: P3
Description:
As the title says, commands like
ipfs add
andipfs files write
don't detect whether they are being piped into on Windows.This doesn't allow to add files into ipfs or mfs with a single step, as in
echo text | ipfs add
orecho text | ipfs files write /path/in/mfs
.(instead
echo text > file; ipfs add file; ipfs files cp /ipfs/hash /path/in/mfs; rm file
has to be used)The text was updated successfully, but these errors were encountered: