Documentation, check if config dir exists

This commit is contained in:
Jan Verbeek 2016-06-29 13:39:18 +02:00
parent 7c350a29d5
commit 980cf5ada1
2 changed files with 4 additions and 1 deletions

View File

@ -33,6 +33,7 @@ The following environment variables will be set when a userscript is launched:
- `QUTE_FIFO`: The FIFO or file to write commands to.
- `QUTE_HTML`: Path of a file containing the HTML source of the current page.
- `QUTE_TEXT`: Path of a file containing the plaintext of the current page.
- `QUTE_CONFIG_DIR`: Path of the directory containing qutebrowser's configuration.
In `command` mode:

View File

@ -376,7 +376,9 @@ def run(cmd, *args, win_id, env, verbose=False):
user_agent = config.get('network', 'user-agent')
if user_agent is not None:
env['QUTE_USER_AGENT'] = user_agent
env['QUTE_CONFIG_DIR'] = standarddir.config()
config_dir = standarddir.config()
if config_dir is not None:
env['QUTE_CONFIG_DIR'] = config_dir
cmd_path = os.path.expanduser(cmd)
# if cmd is not given as an absolute path, look it up