microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
23.13k stars 6.37k forks source link

`vcpkg edit pkg_name` no permission #14707

Closed playgithub closed 3 years ago

playgithub commented 3 years ago

Problem

On Windows, using cmder

λ ls -la
total 535
drwxr-xr-x 1 test_user 197121    0 Nov 22 08:45 ./
drwxr-xr-x 1 test_user 197121    0 Nov 22 21:31 ../
-rw-r--r-- 1 test_user 197121 1417 Nov 22 08:45 0001-Prevent-invalid-inclusions-when-HAVE_-is-set-to-0.patch
-rw-r--r-- 1 test_user 197121  348 Nov 22 08:45 add_debug_postfix_on_mingw.patch
-rw-r--r-- 1 test_user 197121 2946 Nov 22 08:45 cmake_dont_build_more_than_needed.patch
-rw-r--r-- 1 test_user 197121  112 Nov 22 08:45 CONTROL
-rw-r--r-- 1 test_user 197121  993 Nov 22 08:45 LICENSE
-rw-r--r-- 1 test_user 197121 1953 Nov 22 08:45 portfile.cmake
-rw-r--r-- 1 test_user 197121  148 Nov 22 08:45 usage

λ vcpkg edit zlib
(a popup windows says "You do not have permission to open this file. See the owner of the file or an administrator to obtain permission")

vckpkg is in test_user's home folder

More info

I can edit the files of the port manually withou administrator priviledge.

PhoebeHui commented 3 years ago

@playgithub, could you set the eidtor before execute the command?

eg: set EDITOR=C:\Program Files (x86)\Notepad++\notepad++.exe