-
Notifications
You must be signed in to change notification settings - Fork 183
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
[New-TestResources.ps1] Handle multiple segments in service directory path #2065
Conversation
The following pipelines have been queued for testing: |
$serviceName = if (Split-Path -IsAbsolute $ServiceDirectory) { | ||
# If the ServiceDirectory has multiple segments use the last directory name | ||
# e.g. D:\foo\bar -> bar or foo/bar -> bar | ||
$serviceName = if (Split-Path $ServiceDirectory) { |
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.
Not sure if it will matter but go also has some cases where the last part might not be unique.
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.
Originally I was going to set it to replace slash characters with underscores, but then I saw this inner comment and figured the convention might instead be to use the leaf path only. I'd be in favor of changing that convention instead to avoid future duplication problems.
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.
e.g. for absolute path, use leaf, for multi-segment, use full with replace?
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 would stick with this for now and we can figure out another strategy if and when we hit a real issue.
Hello @azure-sdk! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
/check-enforcer evaluate |
This is primary to support second level nesting in service directories introduced by go (e.g.
sdk/keyvault/azsecrets
). See related.