Skip to content

Commit c254b4a

Browse files
Witcher01Hugo Osvaldo Barrera
authored andcommitted
fixed password.fetch option not using environment
the '_strategy_command' in 'fetchparams.cli' did not expand the path of every argument, but only the first one (being the command to be executed). i fixed the '_strategy_command' function to apply the 'expand_path' function to every member of the commands list.
1 parent cfd5af8 commit c254b4a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

AUTHORS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ In alphabetical order:
1313
- Markus Unterwaditzer
1414
- Michael Adler
1515
- Thomas Weißschuh
16+
- Witcher01
1617

1718
Special thanks goes to:
1819

vdirsyncer/cli/fetchparams.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ def _fetch_value(opts, key):
7777
def _strategy_command(*command):
7878
import subprocess
7979

80-
command = (expand_path(command[0]),) + command[1:]
80+
# normalize path of every path member
81+
# if there is no path specified then nothing will happen
82+
command = map(expand_path, command)
83+
8184
try:
8285
stdout = subprocess.check_output(command, universal_newlines=True)
8386
return stdout.strip("\n")

0 commit comments

Comments
 (0)