Skip to content

Commit

Permalink
virtme-ng: support -- syntax to specify long exec commands
Browse files Browse the repository at this point in the history
Allow to specify long commands after "--" to execute inside the
virtme-ng guest, for example:

  $ uname -r
  6.5.0-10-generic
  $ vng -- uname -r
  6.6.0-rc6-virtme

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
  • Loading branch information
Andrea Righi committed Oct 22, 2023
1 parent 41c601b commit f8bf178
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions virtme_ng/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,8 @@ def _get_virtme_no_virtme_ng_init(self, args):
self.virtme_param["no_virtme_ng_init"] = ""

def _get_virtme_exec(self, args):
if args.envs:
args.exec = " ".join(args.envs)
if args.exec is not None:
self.virtme_param["exec"] = f'--script-sh "{args.exec}"'
else:
Expand Down

0 comments on commit f8bf178

Please sign in to comment.