Skip to content

Commit 60d236f

Browse files
committed
Fixed bug where startup script containing a single quote in its file name was incorrectly quoted
1 parent e13fc34 commit 60d236f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.9.23 (TBD, 2019)
2+
* Bug Fixes
3+
* Fixed bug where startup script containing a single quote in its file name was incorrectly quoted
4+
15
## 0.9.22 (December 9, 2019)
26
* Bug Fixes
37
* Fixed bug where a redefined `ansi.style_error` was not being used in all `cmd2` files

cmd2/cmd2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def __init__(self, completekey: str = 'tab', stdin=None, stdout=None, *,
300300
if startup_script:
301301
startup_script = os.path.abspath(os.path.expanduser(startup_script))
302302
if os.path.exists(startup_script):
303-
self._startup_commands.append("run_script '{}'".format(startup_script))
303+
self._startup_commands.append("run_script {}".format(utils.quote_string(startup_script)))
304304

305305
# Transcript files to run instead of interactive command loop
306306
self._transcript_files = None

0 commit comments

Comments
 (0)