Skip to content

Conversation

@kzantow
Copy link
Contributor

@kzantow kzantow commented May 17, 2024

When running this action on Windows, we need to account for the .exe file suffix.

Fixes: #313

@kzantow kzantow force-pushed the fix/execute-on-windows branch from 9ade014 to b13c331 Compare May 17, 2024 18:24
@kzantow kzantow marked this pull request as ready for review May 17, 2024 18:49
@kzantow kzantow force-pushed the fix/execute-on-windows branch from 00ce720 to e0a00e3 Compare May 20, 2024 16:34
kzantow added 5 commits May 20, 2024 12:37
Signed-off-by: Keith Zantow <[email protected]>
Signed-off-by: Keith Zantow <[email protected]>
Signed-off-by: Keith Zantow <[email protected]>
Signed-off-by: Keith Zantow <[email protected]>
fail-build: false

- name: Validate file exists
run: ls '${{ steps.scan.outputs.sarif }}'
Copy link
Contributor

Choose a reason for hiding this comment

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

I had to double-check up the return code of ls if passed a non-existent file. On Linux, I think test -f might be a cleaner test (though test isn't available on Windows).

Not blocking though - this works.

fail-build: false

- name: Validate file exists
run: ls '${{ steps.scan.outputs.sarif }}'
Copy link
Contributor

Choose a reason for hiding this comment

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

Just want to double-check that this way of checking whether a file exists works on Windows - don't have a windows machine in front of me to check myself.

Specifically, can you make sure that ls some-non-existent-file on Windows exits non-zero?

Signed-off-by: Keith Zantow <[email protected]>
@kzantow kzantow closed this May 21, 2024
@kzantow kzantow reopened this May 21, 2024
Signed-off-by: Keith Zantow <[email protected]>
@kzantow kzantow force-pushed the fix/execute-on-windows branch from 42c30ab to ff87f3f Compare May 21, 2024 18:42
kzantow added 3 commits May 21, 2024 14:44
Signed-off-by: Keith Zantow <[email protected]>
Signed-off-by: Keith Zantow <[email protected]>
Signed-off-by: Keith Zantow <[email protected]>
@kzantow kzantow dismissed willmurphyscode’s stale review May 21, 2024 19:10

Reworked test actions

kzantow added 2 commits May 21, 2024 16:56
Signed-off-by: Keith Zantow <[email protected]>
Signed-off-by: Keith Zantow <[email protected]>
@kzantow kzantow merged commit b4a7247 into anchore:main May 23, 2024
@kzantow kzantow deleted the fix/execute-on-windows branch May 23, 2024 15:35
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.

Support for windows

2 participants