Skip to content

Conversation

andrei-toterman
Copy link
Contributor

Passing a process substitution to --cloud-init didn't work since it was checking if it received a regular file, but a process substitution returns a named pipe. Unfortunately QT doesn't have a way to check if a path is a named pipe, but fortunately std::filesystem does.

fix #1589

@andrei-toterman andrei-toterman changed the title [cli][launch] allow cloud-init file to be a named pipe Allow using process substitution for cloud-init file Aug 10, 2022
@codecov
Copy link

codecov bot commented Aug 10, 2022

Codecov Report

Merging #2700 (12d2bfe) into main (becdbe0) will decrease coverage by 0.10%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2700      +/-   ##
==========================================
- Coverage   86.64%   86.54%   -0.11%     
==========================================
  Files         218      218              
  Lines       10981    10904      -77     
==========================================
- Hits         9515     9437      -78     
- Misses       1466     1467       +1     
Impacted Files Coverage Δ
src/client/cli/cmd/launch.cpp 85.02% <100.00%> (ø)
src/simplestreams/simple_streams_manifest.cpp 94.50% <0.00%> (-2.11%) ⬇️
src/daemon/custom_image_host.cpp 97.61% <0.00%> (-0.89%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@townsend2010 townsend2010 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

bors merge

bors bot added a commit that referenced this pull request Aug 12, 2022
2700: Allow using process substitution for cloud-init file r=townsend2010 a=andrei-toterman

Passing a process substitution to `--cloud-init` didn't work since it was checking if it received a regular file, but a process substitution returns a named pipe. Unfortunately QT doesn't have a way to check if a path is a named pipe, but fortunately `std::filesystem` does.

fix #1589 

Co-authored-by: Andrei Toterman <[email protected]>
@bors
Copy link
Contributor

bors bot commented Aug 12, 2022

Build failed:

@andrei-toterman
Copy link
Contributor Author

bors retry

bors bot added a commit that referenced this pull request Aug 12, 2022
2700: Allow using process substitution for cloud-init file r=townsend2010 a=andrei-toterman

Passing a process substitution to `--cloud-init` didn't work since it was checking if it received a regular file, but a process substitution returns a named pipe. Unfortunately QT doesn't have a way to check if a path is a named pipe, but fortunately `std::filesystem` does.

fix #1589 

Co-authored-by: Andrei Toterman <[email protected]>
@bors
Copy link
Contributor

bors bot commented Aug 13, 2022

Build failed:

@andrei-toterman
Copy link
Contributor Author

bors retry

bors bot added a commit that referenced this pull request Aug 13, 2022
2700: Allow using process substitution for cloud-init file r=townsend2010 a=andrei-toterman

Passing a process substitution to `--cloud-init` didn't work since it was checking if it received a regular file, but a process substitution returns a named pipe. Unfortunately QT doesn't have a way to check if a path is a named pipe, but fortunately `std::filesystem` does.

fix #1589 

Co-authored-by: Andrei Toterman <[email protected]>
@bors
Copy link
Contributor

bors bot commented Aug 13, 2022

Build failed:

@townsend2010
Copy link
Contributor

Again...

bors retry

@bors bors bot merged commit 8ad6f6e into main Aug 15, 2022
@bors bors bot deleted the cloud-init-from-process-substitution branch August 15, 2022 17:20
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.

Broken process substitution for multipass launch command
2 participants