Fix mktemp template so deploy-managed-agent.sh runs on Linux#41
Open
akhilesharora wants to merge 1 commit into
Open
Fix mktemp template so deploy-managed-agent.sh runs on Linux#41akhilesharora wants to merge 1 commit into
akhilesharora wants to merge 1 commit into
Conversation
GNU mktemp wants 3+ X's in a -t template. The bare `mktemp -t skillcache` and `mktemp -t skill` calls worked on macOS but crash on Linux before the script does anything. test-cookbooks.sh fails the same way for all 5 cookbooks because it calls deploy --dry-run. Adding .XXXXXX is portable: GNU expands the X's, BSD treats them as prefix. Confirmed on Ubuntu 24.04 / coreutils 9.4: test-cookbooks goes 0/5 -> 5/5.
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GNU mktemp wants 3+ X's in a -t template. The two
mktemp -t skillcache/mktemp -t skillcalls in deploy-managed-agent.sh work on macOS (BSD mktemp tolerates a bare prefix) but blow up on Linux, taking test-cookbooks.sh down with them - 0/5 cookbooks passed dry-run on main.Adding
.XXXXXXis portable: GNU expands the X's, BSD treats them as part of the prefix and appends its own randomness. After:Tested on Ubuntu 24.04, coreutils 9.4.
Side note:
upload_skillalso leaks an empty/tmp/skill.*per real deploy - mktemp creates the file, the script writes the archive to<file>.zip, only the.zipgets cleaned. Left out to keep the diff to one thing.