You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to add an incus alias to automatically update and upgrade packages in instances, but the alias failed when I tried to use it due to an unterminated quoted string.
sh -c 'apt update && apt upgrade' in the instance works as expected.
incus exec test -- sh -c 'apt update && apt upgrade' in the host works as expected.
incus alias add up "exec @ARGS@ -- sh -c 'apt update && apt upgrade'" in the host works as expected.
incus up test-instance does not work: unterminated quoted string (see steps to reproduce).
I can work around this by adding individual aliases for apt update and apt upgrade, but it would be nice to be able to do this with a single alias.
Steps to reproduce
$ incus launch images:ubuntu/24.04 test-instance --storage default
$ incus alias add up "exec @ARGS@ -- sh -c 'apt update && apt upgrade'"
$ incus alias list
+------------+--------------------------------------------------+
| ALIAS | TARGET |
+------------+--------------------------------------------------+
| up |exec @ARGS@ -- sh -c 'apt update && apt upgrade'|
+------------+--------------------------------------------------+
$ incus up test-instance
update: 1: Syntax error: Unterminated quoted string
The text was updated successfully, but these errors were encountered:
Required information
Issue description
I wanted to add an incus alias to automatically update and upgrade packages in instances, but the alias failed when I tried to use it due to an unterminated quoted string.
sh -c 'apt update && apt upgrade'
in the instance works as expected.incus exec test -- sh -c 'apt update && apt upgrade'
in the host works as expected.incus alias add up "exec @ARGS@ -- sh -c 'apt update && apt upgrade'"
in the host works as expected.incus up test-instance
does not work: unterminated quoted string (see steps to reproduce).I can work around this by adding individual aliases for
apt update
andapt upgrade
, but it would be nice to be able to do this with a single alias.Steps to reproduce
The text was updated successfully, but these errors were encountered: