diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-12-17 22:06:38 -0500 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-12-17 22:06:38 -0500 |
commit | 60d236fdd331304b9d516f080c9a36c08c4baa9e (patch) | |
tree | 29a38a10b0909c6051f4491d449f6d69efb2a1d2 | |
parent | e13fc34e6f7d9e67422595411b62ff12b8bf769b (diff) | |
download | cmd2-git-60d236fdd331304b9d516f080c9a36c08c4baa9e.tar.gz |
Fixed bug where startup script containing a single quote in its file name was incorrectly quoted
-rw-r--r-- | CHANGELOG.md | 4 | ||||
-rw-r--r-- | cmd2/cmd2.py | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 79b50d49..20427976 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.23 (TBD, 2019) +* Bug Fixes + * Fixed bug where startup script containing a single quote in its file name was incorrectly quoted + ## 0.9.22 (December 9, 2019) * Bug Fixes * Fixed bug where a redefined `ansi.style_error` was not being used in all `cmd2` files diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 6c4fdcbd..9120c6af 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -300,7 +300,7 @@ class Cmd(cmd.Cmd): if startup_script: startup_script = os.path.abspath(os.path.expanduser(startup_script)) if os.path.exists(startup_script): - self._startup_commands.append("run_script '{}'".format(startup_script)) + self._startup_commands.append("run_script {}".format(utils.quote_string(startup_script))) # Transcript files to run instead of interactive command loop self._transcript_files = None |