-
Notifications
You must be signed in to change notification settings - Fork 260
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
Install templates from remote tarball #2957
Install templates from remote tarball #2957
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some nits that I'd love to see addressed, but nothing is blocking.
@@ -192,6 +203,84 @@ async fn check_local(path: &Path) -> anyhow::Result<LocalTemplateSource> { | |||
} | |||
} | |||
|
|||
async fn download_untar_local(url: &Url) -> anyhow::Result<LocalTemplateSource> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this make sense as a function on LocalTemplateSource
? Like LocalTemplateSource::from_remote_tarball
? Then you can leave a doc comment outlining that it downloads the tarball to a temp dir.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other "pull down a remote source" functions are free, so I've followed the same pattern for now. We can change them all to methods in a separate refactoring pass if we prefer that. In the meantime I've added the doc comment.
a9da922
to
d3247ba
Compare
Signed-off-by: itowlson <[email protected]>
d3247ba
to
a6c2f94
Compare
Ref fermyon/spin#2957 Signed-off-by: Jan Dubois <[email protected]>
Ref fermyon/spin#2957 Signed-off-by: Jan Dubois <[email protected]> (cherry picked from commit 6a7a7f5)
Fixes #2955.