Skip to content

Commit

Permalink
fixed non-string bootstrap output
Browse files Browse the repository at this point in the history
  • Loading branch information
mofm committed Mar 3, 2022
1 parent 7290923 commit 30d9e27
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/nspctl/_nspctl.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def _bootstrap_arch(name, **kwargs):
ret = run_cmd(cmd, is_shell=True)
if ret["returncode"] != 0:
_build_failed(dest, name)
return ret
return ret["stdout"]


def _bootstrap_debian(name, **kwargs):
Expand Down Expand Up @@ -149,11 +149,11 @@ def _bootstrap_debian(name, **kwargs):
)

dest = _make_container_root(name)
cmd = "debootstrap --arch=amd64 {} {}".format(version, dest)
cmd = "debootstrap --include=systemd-container {} {}".format(version, dest)
ret = run_cmd(cmd, is_shell=True)
if ret["returncode"] != 0:
_build_failed(dest, name)
return ret
return ret["stdout"]


def _bootstrap_ubuntu(name, **kwargs):
Expand Down Expand Up @@ -181,11 +181,11 @@ def _bootstrap_ubuntu(name, **kwargs):
)

dest = _make_container_root(name)
cmd = "debootstrap --arch=amd64 {} {}".format(version, dest)
cmd = "debootstrap --include=systemd-container {} {}".format(version, dest)
ret = run_cmd(cmd, is_shell=True)
if ret["returncode"] != 0:
_build_failed(dest, name)
return ret
return ret["stdout"]


@_check_useruid
Expand Down
6 changes: 3 additions & 3 deletions src/nspctl/lib/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,15 @@ def nspctl_help():
+ " [ "
+ green("bootstrap")
+ " ] [ "
+ turquoise("container name")
+ " ] [ "
+ turquoise("debian")
+ " | "
+ turquoise("ubuntu")
+ " | "
+ turquoise("arch")
+ " ] [ "
+ turquoise("--version")
+ " ] [ "
+ green("container name")
+ green("version")
+ " ] "
)
print(yellow("Shortcuts:"))
Expand Down
2 changes: 1 addition & 1 deletion src/nspctl/lib/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def bootstrap(self, args=None, subparsers=None):
sp = subparsers.add_parser("bootstrap")
sp.add_argument("name")
sp.add_argument("dist")
sp.add_argument("version")
sp.add_argument("version", nargs="?")
sp.set_defaults(func=self.bootstrap)
return

Expand Down

0 comments on commit 30d9e27

Please sign in to comment.