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

[ADXT-815] [e2e] filepath.Join should be agnostic of the runner OS #1351

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

KevinFairise2
Copy link
Member

What does this PR do?

Some operations currently uses the runner OS information to determine the separator. It does not make sense as the commands are excuted on the target OS. This PR updates that so the commands are executed depending on the target OS

Which scenarios this will impact?

Motivation

Additional Notes

@KevinFairise2 KevinFairise2 requested a review from a team as a code owner January 10, 2025 15:39
@@ -121,7 +125,7 @@ func (fs unixOSCommand) copyLocalFile(runner *LocalRunner, name string, src, dst

func (fs unixOSCommand) copyRemoteFile(runner *RemoteRunner, name string, src, dst pulumi.StringInput, opts ...pulumi.ResourceOption) (pulumi.Resource, error) {
tempRemotePath := src.ToStringOutput().ApplyT(func(path string) string {
return filepath.Join(runner.OsCommand().GetTemporaryDirectory(), filepath.Base(path))
Copy link
Member

Choose a reason for hiding this comment

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

Is it the only occurrence we needed to change?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep in our code. There are other occurences but in KMT specific which I think there is no chance it can be ran from a Windows laptop

@KevinFairise2 KevinFairise2 enabled auto-merge (squash) January 13, 2025 10:36
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.

3 participants