frontends (jp / blog): pass the profile to subprocess when using option --preview

This commit is contained in:
souliane 2016-03-07 19:58:33 +01:00
commit ce507c49da

View file

@ -220,7 +220,7 @@ class Edit(base.CommandBase, BlogCommon):
# we redirect outputs to /dev/null to avoid console pollution in editor
# if user wants to see messages, (s)he can call "blog preview" directly
DEVNULL = open(os.devnull, 'wb')
subprocess.Popen([sys.argv[0], "blog", "preview", "--inotify", "true", content_file_path], stdout=DEVNULL, stderr=subprocess.STDOUT)
subprocess.Popen([sys.argv[0], "blog", "preview", "--inotify", "true", "-p", self.profile, content_file_path], stdout=DEVNULL, stderr=subprocess.STDOUT)
# then we launch editor
editor = config.getConfig(sat_conf, 'jp', 'editor') or os.getenv('EDITOR', 'vi')