Skip to content

Commit

Permalink
Merge pull request #211 from suzuki-shunsuke/feat/add-alias-l
Browse files Browse the repository at this point in the history
feat: add the alias `l` to the option `only-link`
  • Loading branch information
suzuki-shunsuke authored Sep 8, 2021
2 parents a7190d7 + 6594694 commit 91cb892
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ Tools are installed in `~/.aqua/pkgs` and symbolic links are created in `~/.aqua
It takes a long time to install many tools all at once, and some tools might not be actually needed.
So instead of `aqua i` let's execute `aqua i --only-link`.
So instead of `aqua i` let's execute `aqua i -l`.
```
$ aqua i --only-link
$ aqua i -l
```
`--only-link` creates symbolic links to aqua-proxy in `~/.aqua/bin` but skipping the downloading and installing tools.
`aqua i -l` creates symbolic links to aqua-proxy in `~/.aqua/bin` but skipping the downloading and installing tools.
When you execute the tool, the tool is installed automatically if it isn't installed yet before it is executed.
We call this feature as _lazy install_.
By the lazy install, you don't have to execute aqua explicitly after changing the tool's version.
Expand Down
7 changes: 4 additions & 3 deletions pkg/cli/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type LDFlags struct {
Date string
}

func (runner *Runner) Run(ctx context.Context, args ...string) error {
func (runner *Runner) Run(ctx context.Context, args ...string) error { //nolint:funlen
compiledDate, err := time.Parse(time.RFC3339, runner.LDFlags.Date)
if err != nil {
compiledDate = time.Now()
Expand Down Expand Up @@ -53,8 +53,9 @@ func (runner *Runner) Run(ctx context.Context, args ...string) error {
Action: runner.installAction,
Flags: []cli.Flag{
&cli.BoolFlag{
Name: "only-link",
Usage: "create links but skip download packages",
Name: "only-link",
Aliases: []string{"l"},
Usage: "create links but skip download packages",
},
&cli.BoolFlag{
Name: "test",
Expand Down

0 comments on commit 91cb892

Please sign in to comment.