pluveto / upgit

Another upload hub that supports clipboard. It works well with Typora, Snipaste, VSCode.
MIT License
529 stars 44 forks source link

配置环境变量后依然无法运行upgit #65

Closed Tenstu closed 1 year ago

Tenstu commented 1 year ago

开发者你好,使用的windows,系统信息如下

Edition Windows 10 Enterprise LTSC
Version 21H2
Installed on    ‎1/‎1/‎2022
OS build    19044.2486
Experience  Windows Feature Experience Pack 120.2212.4190.0

下载upgit_win_amd64.exe或 upgit_win_386.exe 到本地E:\download\app\upgit路径并重命名upgit.exe,已配置config.toml 文件,添加个人环境变量:upgit, 路径为E:\download\app\upgitE:\download\app\upgit\upgit.exe后,使用cmd命令where upgit均无法找到upgit命令 INFO: Could not find files for the given pattern(s). ,直接使用命令如upgit :clipboard -o clipboard -f bbcode,提示 'upgit' is not recognized as an internal or external command, operable program or batch file.请问如何解决?

pluveto commented 1 year ago

Please paste the result of set command in cmd.exe here.

Tenstu commented 1 year ago

@pluveto here are the results

Please paste the result of set command in cmd.exe here.

C:\Users\zl>set
ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\zl\AppData\Roaming
CommonProgramFiles=C:\Program Files\Common Files
CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files
CommonProgramW6432=C:\Program Files\Common Files
COMPUTERNAME=DESKTOP-5K88CHF
ComSpec=C:\Windows\system32\cmd.exe
DriverData=C:\Windows\System32\Drivers\DriverData
HOMEDRIVE=C:
HOMEPATH=\Users\zl
LOCALAPPDATA=C:\Users\zl\AppData\Local
LOGONSERVER=\\DESKTOP-5K88CHF
MOZ_PLUGIN_PATH=D:\Programe\Foxit Reader\Foxit PDF Reader\plugins\
NUMBER_OF_PROCESSORS=12
OneDrive=C:\Users\zl\OneDrive
OS=Windows_NT
pandoc=C:\Users\zl\AppData\Local\Pandoc
Path=D:\Programe\Vmvare\bin\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\dotnet\;D:\Programe\PDFtk\bin\;C:\Users\zl\AppData\Local\Programs\Python\Python311\Scripts\;C:\Users\zl\AppData\Local\Programs\Python\Python311\;C:\Users\zl\AppData\Local\Microsoft\WindowsApps;;D:\Programe\texlive\2022\bin\win32;D:\Programe\Microsoft VS Code\bin;C:\Users\zl\AppData\Local\Pandoc\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=AMD64
PROCESSOR_IDENTIFIER=AMD64 Family 25 Model 80 Stepping 0, AuthenticAMD
PROCESSOR_LEVEL=25
PROCESSOR_REVISION=5000
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
ProgramFiles(x86)=C:\Program Files (x86)
ProgramW6432=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules
PUBLIC=C:\Users\Public
RTOOLS42_HOME=D:\Programe\rtools42
SESSIONNAME=Console
SumatraPDF=D:\Programe\SumatraPDF
SystemDrive=C:
SystemRoot=C:\Windows
TEMP=C:\Users\zl\AppData\Local\Temp
texlive=D:\Programe\texlive\2022\bin\win32
TMP=C:\Users\zl\AppData\Local\Temp
upgit=E:\download\app\upgit\upgit.exe
USERDOMAIN=DESKTOP-5K88CHF
USERDOMAIN_ROAMINGPROFILE=DESKTOP-5K88CHF
USERNAME=zl
USERPROFILE=C:\Users\zl
windir=C:\Windows
pluveto commented 1 year ago

Seems upgit folder is not in your PATH env var. Please check.

Tenstu commented 1 year ago

I check and change the folder to folder E:\ upgit and reboot the PC, still the same results.

C:\Users\zl>where upgit INFO: Could not find files for the given pattern(s).

C:\Users\zl>set ALLUSERSPROFILE=C:\ProgramData APPDATA=C:\Users\zl\AppData\Roaming CommonProgramFiles=C:\Program Files\Common Files CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files CommonProgramW6432=C:\Program Files\Common Files COMPUTERNAME=DESKTOP-5K88CHF ComSpec=C:\Windows\system32\cmd.exe DriverData=C:\Windows\System32\Drivers\DriverData FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer FPS_BROWSER_USER_PROFILE_STRING=Default HOMEDRIVE=C: HOMEPATH=\Users\zl LOCALAPPDATA=C:\Users\zl\AppData\Local LOGONSERVER=\DESKTOP-5K88CHF MOZ_PLUGIN_PATH=D:\Programe\Foxit Reader\Foxit PDF Reader\plugins\ NUMBER_OF_PROCESSORS=12 OneDrive=C:\Users\zl\OneDrive OS=Windows_NT pandoc=C:\Users\zl\AppData\Local\Pandoc Path=D:\Programe\Vmvare\bin\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\dotnet\;D:\Programe\PDFtk\bin\;C:\Users\zl\AppData\Local\Programs\Python\Python311\Scripts\;C:\Users\zl\AppData\Local\Programs\Python\Python311\;C:\Users\zl\AppData\Local\Microsoft\WindowsApps;;D:\Programe\texlive\2022\bin\win32;D:\Programe\Microsoft VS Code\bin;C:\Users\zl\AppData\Local\Pandoc\ PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC PROCESSOR_ARCHITECTURE=AMD64 PROCESSOR_IDENTIFIER=AMD64 Family 25 Model 80 Stepping 0, AuthenticAMD PROCESSOR_LEVEL=25 PROCESSOR_REVISION=5000 ProgramData=C:\ProgramData ProgramFiles=C:\Program Files ProgramFiles(x86)=C:\Program Files (x86) ProgramW6432=C:\Program Files PROMPT=$P$G PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules PUBLIC=C:\Users\Public RTOOLS42_HOME=D:\Programe\rtools42 SESSIONNAME=Console SumatraPDF=D:\Programe\SumatraPDF SystemDrive=C: SystemRoot=C:\Windows TEMP=C:\Users\zl\AppData\Local\Temp texlive=D:\Programe\texlive\2022\bin\win32 TMP=C:\Users\zl\AppData\Local\Temp upgit=E:\upgit USERDOMAIN=DESKTOP-5K88CHF USERDOMAIN_ROAMINGPROFILE=DESKTOP-5K88CHF USERNAME=zl USERPROFILE=C:\Users\zl windir=C:\Windows

pluveto commented 1 year ago

Sorry but I still cannot see upgit dir in Path env var in your computer which is

Path=D:\Programe\Vmvare\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\dotnet;D:\Programe\PDFtk\bin;C:\Users\zl\AppData\Local\Programs\Python\Python311\Scripts;C:\Users\zl\AppData\Local\Programs\Python\Python311;C:\Users\zl\AppData\Local\Microsoft\WindowsApps;;D:\Programe\texlive\2022\bin\win32;D:\Programe\Microsoft VS Code\bin;C:\Users\zl\AppData\Local\Pandoc

Please add E:\upgit to Path

Tenstu commented 1 year ago

Thank you for your patient advise, I ignore the Path ENV and misunderstand with other ENV, it helped!