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

fix: fix coder template pull on Windows #9327

Merged
merged 4 commits into from
Aug 25, 2023

Conversation

spikecurtis
Copy link
Contributor

fixes #9291 and adds a unit test

Signed-off-by: Spike Curtis <spike@coder.com>
@spikecurtis
Copy link
Contributor Author

Unfortunately, extracting the tests out of a t.Run() subtest structure breaks the diff on GitHub. But, the new test can't be run in parallel, so it can't be a subtest...

Signed-off-by: Spike Curtis <spike@coder.com>
Copy link
Member

@mtojek mtojek left a comment

Choose a reason for hiding this comment

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

👍 as along as CI is happy

cli/templatepull_test.go Outdated Show resolved Hide resolved
@mafredri
Copy link
Member

Unfortunately, extracting the tests out of a t.Run() subtest structure breaks the diff on GitHub. But, the new test can't be run in parallel, so it can't be a subtest...

Using the hide whitespace feature made it quite alright 👌

Signed-off-by: Spike Curtis <spike@coder.com>
@spikecurtis spikecurtis enabled auto-merge (squash) August 25, 2023 08:49
@github-actions
Copy link

github-actions bot commented Aug 25, 2023


✔️ PR 9327 Created successfully.
🚀 Access the credentials here.

cc: @matifali

@matifali
Copy link
Member

Tested here seems to resolve the issue.

PS C:\Users\matif\Downloads> .\coder_test.exe login https://pr9327.test.cdr.dev/
Your browser has been opened to visit:

        https://pr9327.test.cdr.dev/cli-auth

> Paste your token here:
> Welcome to Coder, coder! You're authenticated.
PS C:\Users\matif\Downloads> .\coder_test.exe templates ls
NAME        LAST UPDATED     USED BY
kubernetes  August 25, 2023  - active developers
PS C:\Users\matif\Downloads> .\coder_test.exe templates pull kubernetes
Extracting template to "kubernetes"
PS C:\Users\matif\Downloads> ls .\kubernetes\

    Directory: C:\Users\matif\Downloads\kubernetes

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a---          25/08/2023 12:16 pm           2489 .terraform.lock.hcl
-a---          25/08/2023 12:16 pm           8147 main.tf

Copy link
Member

@matifali matifali left a comment

Choose a reason for hiding this comment

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

tested in a PR deployment and seems to resolve the issue.

@spikecurtis spikecurtis merged commit aed891b into main Aug 25, 2023
21 checks passed
@spikecurtis spikecurtis deleted the spike/9291-template-pull-windows branch August 25, 2023 10:58
@github-actions github-actions bot locked and limited conversation to collaborators Aug 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

coder templates pull does not work as expected on Windows
5 participants