Skip to content

Add ls command to tvm - #37

Merged
btromanova merged 3 commits into
masterfrom
tvm-ls
Oct 2, 2019
Merged

btromanova merged 3 commits into
masterfrom
tvm-ls

Conversation

@dansimau

@dansimau dansimau commented Aug 1, 2019 •

Copy link
Copy Markdown
Contributor

This allows you to list the locally-downloaded versions of Terraform in
the tvm repo/cache, e.g.:

$ tvm ls
0.12.5
0.12.0
0.11.11
0.11.9
0.11.7
0.11.5 (current, installed at: /usr/local/bin/terraform)
0.10.8
0.9.11
0.8.8
0.7.13
0.7.11
0.7.7
0.7.0
0.6.0

There are no tests for tvm yet. I think we can add this in a later diff. To
support testing we need to refactor the CLI to match the same pattern as the
astro CLI.

This allows you to list the locally-downloaded versions of Terraform in
the tvm repo/cache.
@dansimau
dansimau requested a review from btromanova August 1, 2019 09:05
@dansimau dansimau self-assigned this Aug 1, 2019
Comment thread astro/tvm/cli/tvm/cmd/list.go Outdated
@@ -0,0 +1,95 @@
/*
* Copyright (c) 2018 Uber Technologies, Inc.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/2018/2019/

Comment thread astro/tvm/cli/tvm/cmd/list.go Resolved
Comment thread astro/tvm/cli/tvm/cmd/list.go Resolved
Comment thread astro/tvm/versionrepo.go Outdated
return nil, err
}

f.Close()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not defer f.Close() right after you opened it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

brain fart

@btromanova
btromanova merged commit c972a31 into master Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants