You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.
Suppose I invoke Atom from dmenu (making it start under /home/bruno), and it auto-reopens my last project, under /home/bruno/Git/project. Upon saving, linter-gcc should run gcc from /home/bruno/Git/project as said in the package description ("Paths are expanded relative to the project that contains the file being linted.").
However, gcc runs under /home/bruno, thus breaking all the relative include paths specified in .gcc-flags.json., among other things.
In order to reproduce/prove, edit the config file and replace /usr/bin/gcc with a path to some shell script that reports its own $PWD, such as one containing the command xmessage "at: $PWD --- args: $*" &, which will simply open a pop-up with its $PWD and parameters. Then, just launch atom from any folder, letting it reopen the last project, save a C source file, and wait for it.
The linter is therefore unusable unless I start Atom from the exact project folder every time (not convenient) or specify absolute paths everywhere (not portable). Besides, this is arguably a security flaw too, since broken relative paths can be made to lead to files the user does not intend on compiling... keep in mind the C preprocessor alone can do arbitrary computation.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Suppose I invoke Atom from
dmenu
(making it start under/home/bruno
), and it auto-reopens my last project, under/home/bruno/Git/project
. Upon saving,linter-gcc
should rungcc
from/home/bruno/Git/project
as said in the package description ("Paths are expanded relative to the project that contains the file being linted.").However,
gcc
runs under/home/bruno
, thus breaking all the relative include paths specified in.gcc-flags.json.
, among other things.In order to reproduce/prove, edit the config file and replace
/usr/bin/gcc
with a path to some shell script that reports its own$PWD
, such as one containing the commandxmessage "at:
$PWD--- args: $*" &
, which will simply open a pop-up with its$PWD
and parameters. Then, just launch atom from any folder, letting it reopen the last project, save a C source file, and wait for it.The linter is therefore unusable unless I start Atom from the exact project folder every time (not convenient) or specify absolute paths everywhere (not portable). Besides, this is arguably a security flaw too, since broken relative paths can be made to lead to files the user does not intend on compiling... keep in mind the C preprocessor alone can do arbitrary computation.
The text was updated successfully, but these errors were encountered: