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

Correct Erroring Default Variable Assignments on Systems with unique file paths #1387

Conversation

buidav
Copy link
Collaborator

@buidav buidav commented Oct 30, 2024

🗣 Description

  • Make DefaultOutPath work on UNC file systems.
  • Add a try catch to the DefaultOPAPath assignment.

💭 Motivation and context

Closes #1315
Closes #1369

🧪 Testing

  • Try to run Import-Module .\PowerShell\ScubaGear on a non-Windows system.
  • Try to run Import-Module .\PowerShell\ScubaGear on system using UNC file paths.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • PR targets the correct parent branch (e.g., main or release-name) for merge.
  • Changes are limited to a single related goals ;) - eschew scope creep!
  • Changes are sized such that they do not touch excessive number of files.
  • These code changes follow the ScubaGear content style guide.
  • Related issues these changes resolve are linked preferably via closing keywords.
  • All relevant type-of-change labels added.
  • All relevant project fields are set.
  • All relevant repo and/or project documentation updated to reflect these changes.
  • All relevant functional tests passed.
  • All automated checks (e.g., linting, static analysis, unit/smoke tests) passed.

✅ Pre-merge checklist

  • PR passed smoke test check.

  • Feature branch has been rebased against changes from parent branch, as needed

    Use Rebase branch button below or use this reference to rebase from the command line.

  • Resolved all merge conflicts on branch

  • Notified merge coordinator that PR is ready for merge via comment mention

✅ Post-merge checklist

  • Feature branch deleted after merge to clean up repository.
  • Verified that all checks pass on parent branch (e.g., main or release-name) after merge.

@buidav buidav added the bug This issue or pull request addresses broken functionality label Oct 30, 2024
@buidav buidav added this to the Kraken milestone Oct 30, 2024
@buidav buidav requested review from adhilto and tkol2022 October 30, 2024 02:12
@buidav buidav self-assigned this Oct 30, 2024
@adhilto adhilto requested a review from amart241 November 4, 2024 21:44
Copy link
Collaborator

@adhilto adhilto left a comment

Choose a reason for hiding this comment

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

Code changes look good. Tested on a Windows, changes don't break default behavior (as expected). Deferring to @amart241 to test on a Mac.

@rmoffitt-m rmoffitt-m self-requested a review December 6, 2024 20:10
@rmoffitt-m
Copy link
Collaborator

I tested this successfully on a Mac. Worked after manually installing the executable.

Copy link
Collaborator

@rmoffitt-m rmoffitt-m left a comment

Choose a reason for hiding this comment

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

Successful test when manually downloading opa. Didn't use Install-OPAforSCuBA which seems to use a different filename (opa_darwin_amd64) but that's likely a separate issue.

@buidav buidav force-pushed the 1315-scubagear-crashes-when-running-opa-executable-on-some-systems-using-unc-file-paths branch from ebe61c6 to eddea69 Compare December 9, 2024 17:39
@buidav
Copy link
Collaborator Author

buidav commented Dec 9, 2024

@tkol2022
Copy link
Collaborator

tkol2022 commented Dec 9, 2024

I tested on a windows system using UNC paths. No errors.

image

@nanda-katikaneni nanda-katikaneni merged commit e2f99c5 into main Dec 11, 2024
28 checks passed
@nanda-katikaneni nanda-katikaneni deleted the 1315-scubagear-crashes-when-running-opa-executable-on-some-systems-using-unc-file-paths branch December 11, 2024 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue or pull request addresses broken functionality
Projects
None yet
5 participants