Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Provide an option to 'force' install a global command #2132

Closed
kichalla opened this issue Jun 25, 2015 · 8 comments
Closed

Provide an option to 'force' install a global command #2132

kichalla opened this issue Jun 25, 2015 · 8 comments
Assignees
Milestone

Comments

@kichalla
Copy link
Member

I am writing a class library which has a command meant to be used as a global command. I am going through several iterations to test if this global command works as its supposed to.

Now since I am still developing and the version of this package is not going to change, I am seeing that dnu commands install does not replace the package if its already installed(i suppose my assumption is right?).

Can we provide a 'force' option for install which will replace the content even if the version of the package having the command hasn't changed?

Current available options:

Usage: dnu commands install [arguments] [options]

Arguments:
  [package]  The name of the application package
  [version]  The version of the application package

Options:
  -o|--overwrite              Overwrites conflicting commands
  -s|--source <FEED>          A list of packages sources to use for this command
  -f|--fallbacksource <FEED>  A list of packages sources to use as a fallback
  -p|--proxy <ADDRESS>        The HTTP proxy to use when retrieving packages
  --no-cache                  Do not use local cache
  --packages                  Path to restore packages
  --ignore-failed-sources     Ignore failed remote sources if there are local packages meeting version requirements
  --quiet                     Do not show output such as HTTP request/cache information
  --parallel                  Restores in parallel when more than one project.json is discovered.
  -?|-h|--help                Show help information

Workaround:
Do not use as global command just do dnx . <global-command-name> <rest of the stuff that the command expects>

@BrennanConroy
Copy link
Member

Does --overwrite not work?

@kichalla
Copy link
Member Author

@BrennanConroy : --overrwrite is for conflicting commands...like you could have multiple packages with the same command name

@muratg
Copy link
Contributor

muratg commented Jun 29, 2015

@kichalla What's the behavior when you use --overwrite with the same package? It should work here too, no? Perhaps we can make the help for the cmdline switch more helpful for this case too.

@kichalla
Copy link
Member Author

@muratg I verified and the --overwrite switch is not overriding in this case.

@muratg muratg added this to the 1.0.0-beta7 milestone Jun 30, 2015
@BrennanConroy
Copy link
Member

Should we change the behavior of overwrite or add a new command? If new command what should it be called.

@muratg
Copy link
Contributor

muratg commented Jun 30, 2015

I think overwrite should just work. Not sure why it doesn't when the package name is the same...

@victorhurdugaci
Copy link
Contributor

Yeah, make overwrite reinstall the package. Thought your build script should increment the build number (the t-<number> pattern) so it always generate a newer package.

@BrennanConroy
Copy link
Member

004e130

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants