Skip to content

normalize volume.target to drop trailing slash - #697

Merged
ndeloof merged 1 commit into
compose-spec:mainfrom
ndeloof:clean_volume_target
Oct 15, 2024
Merged

normalize volume.target to drop trailing slash#697
ndeloof merged 1 commit into
compose-spec:mainfrom
ndeloof:clean_volume_target

Conversation

@ndeloof

@ndeloof ndeloof commented Oct 14, 2024

Copy link
Copy Markdown
Collaborator

No description provided.

@jhrotko jhrotko left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

So, we moved the clean path to compose-go and cleaned up from compose in order to avoid inconsistensies?

@ndeloof

ndeloof commented Oct 14, 2024

Copy link
Copy Markdown
Collaborator Author

in docker/compose we ran volume.Target = path.Clean(volume.Target) within a func

  1. this was buggy as caller value was left unchanged (would need to pass a pointer)
  2. this is unsafe we "fix" the model inside some unrelated subfunction
    with this change, we get volume target cleaned after model is loaded, so we can safely compare values.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@ndeloof
ndeloof force-pushed the clean_volume_target branch from dfdad2e to 24d6623 Compare October 15, 2024 07:13
@ndeloof
ndeloof marked this pull request as ready for review October 15, 2024 07:13
@ndeloof
ndeloof enabled auto-merge (rebase) October 15, 2024 07:13
@ndeloof
ndeloof merged commit 97c49fc into compose-spec:main Oct 15, 2024
@ndeloof
ndeloof deleted the clean_volume_target branch December 1, 2025 15:45
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.

2 participants