Skip to content

Commit

Permalink
change brun subcommand not to run startup commands as default, and add
Browse files Browse the repository at this point in the history
`--with-startup` option
  • Loading branch information
takuma-yoneda committed Jan 5, 2024
1 parent c1f237f commit 431b942
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lmn/cli/brun.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ def _get_parser() -> ArgumentParser:
action="store_true",
help="Be verbose"
)
parser.add_argument(
"--with-startup",
default=False,
action="store_true",
help="run startup commands"
)
parser.add_argument(
"remote_command",
default=False,
Expand Down Expand Up @@ -69,7 +75,10 @@ def handler(project: Project, machine: Machine, parsed: Namespace, preset: dict)
env = {**project.env, **machine.env}
lmndirs = machine.get_lmndirs(project.name)

startup = ' ; '.join([e for e in [project.startup, machine.startup] if e.strip()])
if parsed.with_startup:
startup = ' ; '.join([e for e in [project.startup, machine.startup] if e.strip()])
else:
startup = ''

# If parsed.mode is not set, try to read from the config file.
from lmn.runner import SSHRunner
Expand Down

0 comments on commit 431b942

Please sign in to comment.