From 3aabbcd244f39f97aed58dd3b7a1f5235b012869 Mon Sep 17 00:00:00 2001 From: Vergil Wong Date: Wed, 21 Feb 2024 10:55:41 +0800 Subject: [PATCH] Fix a path issue --- reload_xmos_device.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reload_xmos_device.ps1 b/reload_xmos_device.ps1 index 6b19fdd..e5004ce 100644 --- a/reload_xmos_device.ps1 +++ b/reload_xmos_device.ps1 @@ -27,10 +27,11 @@ function UninstallDevices($devManViewPath, $devices) { } # 读取配置文件 -$config = Get-Content -Path .\config.json | ConvertFrom-Json + # 配置选项,当选项不起作用时,检查DevManView.cfg中是否配置了filter $scriptPath = $myinvocation.mycommand.definition +$config = Get-Content -Path $scriptPath\..\config.json | ConvertFrom-Json $devManViewPath = $config.devManViewPath $deviceListFile = $config.deviceListFile $pattern = $config.pattern