Exclude single executable from path
I have a small problem with my path environment on windows 10.
I'm running CLion, which uses CMake, and it spits out this error:
sh.exe was found in your PATH, here:
C:/Program Files/Git/bin/sh.exe
For MinGW make to work correctly sh.exe must NOT be in your path.
Run cmake from a shell that does not have sh.exe in your PATH.
Now, I consciously added git to my path so that I can keep using it from the command line, so I was wondering if there's a way to exclude just sh.exe
from my path as I'd much prefer to keep using git from cmd.
I'm also not quite sure if git uses sh.exe
so I'm reluctant to delete it outright.
The environment variable itself is:
C:/Program Files/Git/bin
Running windows 10 Build 17134
If there's a way to configure CMake/CLion to use a shell without using (that part of) the path env variable I'd be glad to hear that too.
windows-10 command-line git environment-variables path
add a comment |
I have a small problem with my path environment on windows 10.
I'm running CLion, which uses CMake, and it spits out this error:
sh.exe was found in your PATH, here:
C:/Program Files/Git/bin/sh.exe
For MinGW make to work correctly sh.exe must NOT be in your path.
Run cmake from a shell that does not have sh.exe in your PATH.
Now, I consciously added git to my path so that I can keep using it from the command line, so I was wondering if there's a way to exclude just sh.exe
from my path as I'd much prefer to keep using git from cmd.
I'm also not quite sure if git uses sh.exe
so I'm reluctant to delete it outright.
The environment variable itself is:
C:/Program Files/Git/bin
Running windows 10 Build 17134
If there's a way to configure CMake/CLion to use a shell without using (that part of) the path env variable I'd be glad to hear that too.
windows-10 command-line git environment-variables path
add a comment |
I have a small problem with my path environment on windows 10.
I'm running CLion, which uses CMake, and it spits out this error:
sh.exe was found in your PATH, here:
C:/Program Files/Git/bin/sh.exe
For MinGW make to work correctly sh.exe must NOT be in your path.
Run cmake from a shell that does not have sh.exe in your PATH.
Now, I consciously added git to my path so that I can keep using it from the command line, so I was wondering if there's a way to exclude just sh.exe
from my path as I'd much prefer to keep using git from cmd.
I'm also not quite sure if git uses sh.exe
so I'm reluctant to delete it outright.
The environment variable itself is:
C:/Program Files/Git/bin
Running windows 10 Build 17134
If there's a way to configure CMake/CLion to use a shell without using (that part of) the path env variable I'd be glad to hear that too.
windows-10 command-line git environment-variables path
I have a small problem with my path environment on windows 10.
I'm running CLion, which uses CMake, and it spits out this error:
sh.exe was found in your PATH, here:
C:/Program Files/Git/bin/sh.exe
For MinGW make to work correctly sh.exe must NOT be in your path.
Run cmake from a shell that does not have sh.exe in your PATH.
Now, I consciously added git to my path so that I can keep using it from the command line, so I was wondering if there's a way to exclude just sh.exe
from my path as I'd much prefer to keep using git from cmd.
I'm also not quite sure if git uses sh.exe
so I'm reluctant to delete it outright.
The environment variable itself is:
C:/Program Files/Git/bin
Running windows 10 Build 17134
If there's a way to configure CMake/CLion to use a shell without using (that part of) the path env variable I'd be glad to hear that too.
windows-10 command-line git environment-variables path
windows-10 command-line git environment-variables path
asked Dec 13 at 7:56
FMashiro
1086
1086
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
No, you cannot exclude a single file from path.
The best that you can do is to have your default path not include git
and create a batch file which allows you to use the git shell and put that in your path.
That way, you can invoke C:/Program Files/Git/bin/sh.exe
from, let’s say, git.bat
which is in your path, but CLion won’t compline because sh.exe
isn’t in your path.
1
What ifgit.exe
requiressh.exe
to be in the path as well? If that is the case, this solution won't work. I am also unaware of a way to comprehensively check if it's the case, if you know a way I'd gladly check and report back if this solution could work :)
– FMashiro
Dec 13 at 8:54
1
A very good point. I guess that you can only suck it & see. Give it a try and let us know. If that won't work, I am out of ideas, sorry.
– Mawg
Dec 13 at 8:57
1
Thanks, I'll try this out and unless I get other suggestions I'll mark this as accepted
– FMashiro
Dec 13 at 8:59
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1383221%2fexclude-single-executable-from-path%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
No, you cannot exclude a single file from path.
The best that you can do is to have your default path not include git
and create a batch file which allows you to use the git shell and put that in your path.
That way, you can invoke C:/Program Files/Git/bin/sh.exe
from, let’s say, git.bat
which is in your path, but CLion won’t compline because sh.exe
isn’t in your path.
1
What ifgit.exe
requiressh.exe
to be in the path as well? If that is the case, this solution won't work. I am also unaware of a way to comprehensively check if it's the case, if you know a way I'd gladly check and report back if this solution could work :)
– FMashiro
Dec 13 at 8:54
1
A very good point. I guess that you can only suck it & see. Give it a try and let us know. If that won't work, I am out of ideas, sorry.
– Mawg
Dec 13 at 8:57
1
Thanks, I'll try this out and unless I get other suggestions I'll mark this as accepted
– FMashiro
Dec 13 at 8:59
add a comment |
No, you cannot exclude a single file from path.
The best that you can do is to have your default path not include git
and create a batch file which allows you to use the git shell and put that in your path.
That way, you can invoke C:/Program Files/Git/bin/sh.exe
from, let’s say, git.bat
which is in your path, but CLion won’t compline because sh.exe
isn’t in your path.
1
What ifgit.exe
requiressh.exe
to be in the path as well? If that is the case, this solution won't work. I am also unaware of a way to comprehensively check if it's the case, if you know a way I'd gladly check and report back if this solution could work :)
– FMashiro
Dec 13 at 8:54
1
A very good point. I guess that you can only suck it & see. Give it a try and let us know. If that won't work, I am out of ideas, sorry.
– Mawg
Dec 13 at 8:57
1
Thanks, I'll try this out and unless I get other suggestions I'll mark this as accepted
– FMashiro
Dec 13 at 8:59
add a comment |
No, you cannot exclude a single file from path.
The best that you can do is to have your default path not include git
and create a batch file which allows you to use the git shell and put that in your path.
That way, you can invoke C:/Program Files/Git/bin/sh.exe
from, let’s say, git.bat
which is in your path, but CLion won’t compline because sh.exe
isn’t in your path.
No, you cannot exclude a single file from path.
The best that you can do is to have your default path not include git
and create a batch file which allows you to use the git shell and put that in your path.
That way, you can invoke C:/Program Files/Git/bin/sh.exe
from, let’s say, git.bat
which is in your path, but CLion won’t compline because sh.exe
isn’t in your path.
answered Dec 13 at 8:41
Mawg
95652548
95652548
1
What ifgit.exe
requiressh.exe
to be in the path as well? If that is the case, this solution won't work. I am also unaware of a way to comprehensively check if it's the case, if you know a way I'd gladly check and report back if this solution could work :)
– FMashiro
Dec 13 at 8:54
1
A very good point. I guess that you can only suck it & see. Give it a try and let us know. If that won't work, I am out of ideas, sorry.
– Mawg
Dec 13 at 8:57
1
Thanks, I'll try this out and unless I get other suggestions I'll mark this as accepted
– FMashiro
Dec 13 at 8:59
add a comment |
1
What ifgit.exe
requiressh.exe
to be in the path as well? If that is the case, this solution won't work. I am also unaware of a way to comprehensively check if it's the case, if you know a way I'd gladly check and report back if this solution could work :)
– FMashiro
Dec 13 at 8:54
1
A very good point. I guess that you can only suck it & see. Give it a try and let us know. If that won't work, I am out of ideas, sorry.
– Mawg
Dec 13 at 8:57
1
Thanks, I'll try this out and unless I get other suggestions I'll mark this as accepted
– FMashiro
Dec 13 at 8:59
1
1
What if
git.exe
requires sh.exe
to be in the path as well? If that is the case, this solution won't work. I am also unaware of a way to comprehensively check if it's the case, if you know a way I'd gladly check and report back if this solution could work :)– FMashiro
Dec 13 at 8:54
What if
git.exe
requires sh.exe
to be in the path as well? If that is the case, this solution won't work. I am also unaware of a way to comprehensively check if it's the case, if you know a way I'd gladly check and report back if this solution could work :)– FMashiro
Dec 13 at 8:54
1
1
A very good point. I guess that you can only suck it & see. Give it a try and let us know. If that won't work, I am out of ideas, sorry.
– Mawg
Dec 13 at 8:57
A very good point. I guess that you can only suck it & see. Give it a try and let us know. If that won't work, I am out of ideas, sorry.
– Mawg
Dec 13 at 8:57
1
1
Thanks, I'll try this out and unless I get other suggestions I'll mark this as accepted
– FMashiro
Dec 13 at 8:59
Thanks, I'll try this out and unless I get other suggestions I'll mark this as accepted
– FMashiro
Dec 13 at 8:59
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1383221%2fexclude-single-executable-from-path%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown