forked from M-Labs/artiq
artiq_flash: resolve openocd symbolic links
On NixOS, openocd may be a symlink in /run/current-system/sw/bin when installed system-wide.
This commit is contained in:
parent
b2bee3da96
commit
ed2d8dfa7a
|
@ -76,7 +76,7 @@ def scripts_path():
|
|||
if os.name == "nt":
|
||||
p.insert(0, "Library")
|
||||
p = os.path.abspath(os.path.join(
|
||||
os.path.dirname(shutil.which("openocd")),
|
||||
os.path.dirname(os.path.realpath(shutil.which("openocd"))),
|
||||
"..", *p))
|
||||
return p
|
||||
|
||||
|
@ -84,7 +84,7 @@ def scripts_path():
|
|||
def proxy_path():
|
||||
p = ["share", "bscan-spi-bitstreams"]
|
||||
p = os.path.abspath(os.path.join(
|
||||
os.path.dirname(shutil.which("openocd")),
|
||||
os.path.dirname(os.path.realpath(shutil.which("openocd"))),
|
||||
"..", *p))
|
||||
return p
|
||||
|
||||
|
|
Loading…
Reference in New Issue