From 10fba65079c25ab3ea2cdbe7c4a714c09914f772 Mon Sep 17 00:00:00 2001 From: leedongmyung Date: Sun, 12 Nov 2023 15:20:23 +0900 Subject: [PATCH] build batch update --- assets/script/batch/build.bat | 7 ++++++- lib/cli/commands/install/regist_path.dart | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/assets/script/batch/build.bat b/assets/script/batch/build.bat index cedb2b6..4c56343 100644 --- a/assets/script/batch/build.bat +++ b/assets/script/batch/build.bat @@ -1,4 +1,9 @@ -PATH=%PATH_WIN% +@echo off +set "PathUser=" +for /F "skip=2 tokens=1,2*" %%G in ('%SystemRoot%\System32\reg.exe query "HKCU\Environment" /v "Path" 2^>nul') do if /I "%%G" == "Path" ( + if /I "%%H" == "REG_EXPAND_SZ" (set "PathExpand=1" & set "PathUser=%%I") else if /I "%%H" == "REG_SZ" set "PathUser=%%I" +) +PATH=%PathUser% SET BuildData > build_data.conf diff --git a/lib/cli/commands/install/regist_path.dart b/lib/cli/commands/install/regist_path.dart index d9858db..8304c7f 100644 --- a/lib/cli/commands/install/regist_path.dart +++ b/lib/cli/commands/install/regist_path.dart @@ -5,7 +5,7 @@ import 'package:dart_framework/utils/system_util.dart'; class RegistPath { static RegistPath? _instance; - // ignore: library_private_types_in_public_api + // ignore: library_private_types_in_public_api, non_constant_identifier_names static RegistPath? get OS { if (_instance == null) { if (Platform.isMacOS) {