
make에서 실행할 수 없는 문제를 디버깅하려고 합니다 flutter
.
Makefile
이것은 문제를 재현하는 최소값입니다 .
fails:
flutter doctor
works:
sh -c flutter doctor
그리고 해당 출력은 다음과 같습니다.
➜ make fails
flutter --version
make: flutter: Permission denied
make: *** [Makefile:2: fails] Error 127
➜ make works
sh -c "flutter --version"
Flutter 2.2.2 • channel stable •
https://github.com/flutter/flutter.git
Framework • revision d79295af24 (7 days ago) • 2021-06-11 08:56:01
-0700
Engine • revision 91c9fc8fe0
Tools • Dart 2.13.3
python
또한 내 경로에서 다른 실행 파일을 실행하는 것(예: , go
또는 무엇이든) 잘 작동하는 것을 관찰했습니다 .
이런 종류의 문제를 디버깅하는 방법, 즉 권한이 거부된 정확한 이유를 어떻게 확인하고 이를 해결하는 방법이 궁금합니다.
편집하다:which flutter
흥미롭게 도 에서 전체 경로를 실행하고 사용하면 Makefile
모든 것이 잘 작동합니다.
also-works:
which flutter
/full/path/to/bin/flutter --version
출력:
➜ make also-works
which flutter
/full/path/to/bin/flutter
/full/path/to/bin/flutter --version
Flutter 2.2.2 • channel stable •
https://github.com/flutter/flutter.git
Framework • revision d79295af24 (7 days ago) • 2021-06-11 08:56:01
-0700
Engine • revision 91c9fc8fe0
Tools • Dart 2.13.3