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

Wrong --local/-L flag documentation #4182

Closed
ghost opened this issue Aug 29, 2017 · 2 comments
Closed

Wrong --local/-L flag documentation #4182

ghost opened this issue Aug 29, 2017 · 2 comments
Labels
kind/bug A bug in existing code (including security flaws) topic/commands:add Topic commands:add topic/commands Topic commands

Comments

@ghost
Copy link

ghost commented Aug 29, 2017

Version information: v0.4.10

Type: bug

Severity: medium

Description:

ipfs --help defines --local as "Run the command locally, instead of using the daemon". This is completely inaccurate. The flag is used in only two places:

  • ipfs add --local uses an Offline Exchange for adding files, skipping the immediate publication of provider records.
  • ipfs name resolve --local uses an Offline Routing Resolver, avoiding IPNS queries to the DHT.

The flag should be removed from the root command, and instead added to these two commands.

There's a backward compatiblity angle to consider, where tools could possibly be calling ipfs --local add <file> instead of the better ipfs add --local <file>.

@ghost ghost added kind/bug A bug in existing code (including security flaws) topic/commands Topic commands topic/commands:add Topic commands:add labels Aug 29, 2017
@ghost ghost changed the title Demote --local/-L to a command-level flag Wrong --local/-L flag documentation Aug 29, 2017
@Stebalien
Copy link
Member

This command should also be extended to work elsewhere (e.g., ipfs block stat). Making this option "just work" everywhere is a pretty decent motivation for #4009.

@Stebalien
Copy link
Member

Fixed. This is now --offline everywhere and behaves as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) topic/commands:add Topic commands:add topic/commands Topic commands
Projects
None yet
Development

No branches or pull requests

1 participant