Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions supervisor/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,10 @@ def get(opt, default, **kwargs):
if directory is None:
section.directory = None
else:
if "~" in directory:
directory = normalize_path(directory)
section.directory = existing_directory(directory)
expansions.update(directory=directory)

section.user = get('user', None)
section.umask = octal_type(get('umask', '022'))
Expand Down Expand Up @@ -966,6 +969,9 @@ def get(section, opt, *args, **kwargs):
expansions['ENV_%s' % k] = v

directory = get(section, 'directory', None)
if directory and "~" in directory:
directory = normalize_path(directory)
expansions.update(directory=directory)

logfiles = {}

Expand Down
2 changes: 1 addition & 1 deletion supervisor/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def _spawn_as_child(self, filename, argv):
cwd = self.config.directory
try:
if cwd is not None:
options.chdir(cwd)
options.chdir(os.path.expanduser(cwd))
except OSError as why:
code = errno.errorcode.get(why.args[0], why.args[0])
msg = "couldn't chdir to %s: %s\n" % (cwd, code)
Expand Down
2 changes: 1 addition & 1 deletion supervisor/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.4.0.dev0
4.5.0