Bashrc not loaded when running Gradle script from Android StudioGet the source directory of a Bash script from within the script itselfIs there a way to run Python on Android?How to check if a program exists from a Bash script?How to check if a service is running on Android?Android Studio installation on Windows 7 fails, no JDK foundAndroid Studio: Add jar as library?What is Gradle in Android Studio?Building and running app via Gradle and Android Studio is slower than via EclipsePassing -P parameters to gradle from android studioHow do I run the same Gradle daemon for terminal and Android Studio?
Gas pipes - why does gas burn "outwards?"
What is going on: C++ std::move on std::shared_ptr increases use_count?
Do Milankovitch Cycles fully explain climate change?
Sol Ⅲ = Earth: What is the origin of this planetary naming scheme?
How to progress with CPLEX/Gurobi
Are programming languages necessary/useful for operations research practitioner?
Why would "an mule" be used instead of "a mule"?
What does "synoptic" mean in avionics?
What's the biggest difference between these two photos?
What is the use of FullForm in Mathematica?
Why should I always enable compiler warnings?
Job offer without any details but asking me to withdraw other applications - is it normal?
Why didn't Thor use the All powerful spear instead of Stormbreaker?
2.5 year old daughter refuses to take medicine
RP Automatic Updates
Can a level 1 Fiend Pact warlock cast a scroll of fireball?
Why does F + F' = 1?
Was Robin Hood's point of view ethically sound?
Is there a star over my head?
Might have gotten a coworker sick, should I address this?
What is negative current?
How is the Team Scooby Doo funded?
Procedure for traffic not in sight
Is there a basic list of ways in which a low-level Rogue can get advantage for sneak attack?
Bashrc not loaded when running Gradle script from Android Studio
Get the source directory of a Bash script from within the script itselfIs there a way to run Python on Android?How to check if a program exists from a Bash script?How to check if a service is running on Android?Android Studio installation on Windows 7 fails, no JDK foundAndroid Studio: Add jar as library?What is Gradle in Android Studio?Building and running app via Gradle and Android Studio is slower than via EclipsePassing -P parameters to gradle from android studioHow do I run the same Gradle daemon for terminal and Android Studio?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I have a problem with Gradle script on Ubuntu 16.04. It looks like my .bashrc is not loaded when I'm invoking script from Android Studio.
My script:
task myTask {
doLast
exec
workingDir project.rootProject.rootDir
commandLine 'll' // alias provided from my .bashrc
When I'm starting it with ./gradlew myTask
everything works, but when starting from gui I'm getting
A problem occurred starting process 'command 'll''
What am I doing wrong?
android bash gradle
add a comment |
I have a problem with Gradle script on Ubuntu 16.04. It looks like my .bashrc is not loaded when I'm invoking script from Android Studio.
My script:
task myTask {
doLast
exec
workingDir project.rootProject.rootDir
commandLine 'll' // alias provided from my .bashrc
When I'm starting it with ./gradlew myTask
everything works, but when starting from gui I'm getting
A problem occurred starting process 'command 'll''
What am I doing wrong?
android bash gradle
Runsource
manually?
– Zoe
Mar 28 at 8:30
add a comment |
I have a problem with Gradle script on Ubuntu 16.04. It looks like my .bashrc is not loaded when I'm invoking script from Android Studio.
My script:
task myTask {
doLast
exec
workingDir project.rootProject.rootDir
commandLine 'll' // alias provided from my .bashrc
When I'm starting it with ./gradlew myTask
everything works, but when starting from gui I'm getting
A problem occurred starting process 'command 'll''
What am I doing wrong?
android bash gradle
I have a problem with Gradle script on Ubuntu 16.04. It looks like my .bashrc is not loaded when I'm invoking script from Android Studio.
My script:
task myTask {
doLast
exec
workingDir project.rootProject.rootDir
commandLine 'll' // alias provided from my .bashrc
When I'm starting it with ./gradlew myTask
everything works, but when starting from gui I'm getting
A problem occurred starting process 'command 'll''
What am I doing wrong?
android bash gradle
android bash gradle
edited Mar 28 at 8:30
Zoe
15.8k12 gold badges66 silver badges96 bronze badges
15.8k12 gold badges66 silver badges96 bronze badges
asked Mar 28 at 8:25
lineanlinean
485 bronze badges
485 bronze badges
Runsource
manually?
– Zoe
Mar 28 at 8:30
add a comment |
Runsource
manually?
– Zoe
Mar 28 at 8:30
Run
source
manually?– Zoe
Mar 28 at 8:30
Run
source
manually?– Zoe
Mar 28 at 8:30
add a comment |
1 Answer
1
active
oldest
votes
Try that :
task myTask
doLast
exec
workingDir project.rootProject.rootDir
commandLine 'bash', '-c', '-i', 'll' // alias provided from my .bashrc
Thanks, it works great. What about other platforms? Do I need to have separate command for Mac and Windows?
– linean
Mar 28 at 11:00
if your command is reallyll
, yes, it won't work elsewhere
– ToYonos
Mar 28 at 11:03
This is just an example. Is it possible to set interactive bash as default for Gradle?
– linean
Mar 31 at 7:40
You can write your own exec task wrapping this behavior
– ToYonos
Mar 31 at 8:19
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
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/4.0/"u003ecc by-sa 4.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%2fstackoverflow.com%2fquestions%2f55393014%2fbashrc-not-loaded-when-running-gradle-script-from-android-studio%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
Try that :
task myTask
doLast
exec
workingDir project.rootProject.rootDir
commandLine 'bash', '-c', '-i', 'll' // alias provided from my .bashrc
Thanks, it works great. What about other platforms? Do I need to have separate command for Mac and Windows?
– linean
Mar 28 at 11:00
if your command is reallyll
, yes, it won't work elsewhere
– ToYonos
Mar 28 at 11:03
This is just an example. Is it possible to set interactive bash as default for Gradle?
– linean
Mar 31 at 7:40
You can write your own exec task wrapping this behavior
– ToYonos
Mar 31 at 8:19
add a comment |
Try that :
task myTask
doLast
exec
workingDir project.rootProject.rootDir
commandLine 'bash', '-c', '-i', 'll' // alias provided from my .bashrc
Thanks, it works great. What about other platforms? Do I need to have separate command for Mac and Windows?
– linean
Mar 28 at 11:00
if your command is reallyll
, yes, it won't work elsewhere
– ToYonos
Mar 28 at 11:03
This is just an example. Is it possible to set interactive bash as default for Gradle?
– linean
Mar 31 at 7:40
You can write your own exec task wrapping this behavior
– ToYonos
Mar 31 at 8:19
add a comment |
Try that :
task myTask
doLast
exec
workingDir project.rootProject.rootDir
commandLine 'bash', '-c', '-i', 'll' // alias provided from my .bashrc
Try that :
task myTask
doLast
exec
workingDir project.rootProject.rootDir
commandLine 'bash', '-c', '-i', 'll' // alias provided from my .bashrc
answered Mar 28 at 10:52
ToYonosToYonos
12.4k2 gold badges30 silver badges51 bronze badges
12.4k2 gold badges30 silver badges51 bronze badges
Thanks, it works great. What about other platforms? Do I need to have separate command for Mac and Windows?
– linean
Mar 28 at 11:00
if your command is reallyll
, yes, it won't work elsewhere
– ToYonos
Mar 28 at 11:03
This is just an example. Is it possible to set interactive bash as default for Gradle?
– linean
Mar 31 at 7:40
You can write your own exec task wrapping this behavior
– ToYonos
Mar 31 at 8:19
add a comment |
Thanks, it works great. What about other platforms? Do I need to have separate command for Mac and Windows?
– linean
Mar 28 at 11:00
if your command is reallyll
, yes, it won't work elsewhere
– ToYonos
Mar 28 at 11:03
This is just an example. Is it possible to set interactive bash as default for Gradle?
– linean
Mar 31 at 7:40
You can write your own exec task wrapping this behavior
– ToYonos
Mar 31 at 8:19
Thanks, it works great. What about other platforms? Do I need to have separate command for Mac and Windows?
– linean
Mar 28 at 11:00
Thanks, it works great. What about other platforms? Do I need to have separate command for Mac and Windows?
– linean
Mar 28 at 11:00
if your command is really
ll
, yes, it won't work elsewhere– ToYonos
Mar 28 at 11:03
if your command is really
ll
, yes, it won't work elsewhere– ToYonos
Mar 28 at 11:03
This is just an example. Is it possible to set interactive bash as default for Gradle?
– linean
Mar 31 at 7:40
This is just an example. Is it possible to set interactive bash as default for Gradle?
– linean
Mar 31 at 7:40
You can write your own exec task wrapping this behavior
– ToYonos
Mar 31 at 8:19
You can write your own exec task wrapping this behavior
– ToYonos
Mar 31 at 8:19
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- 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%2fstackoverflow.com%2fquestions%2f55393014%2fbashrc-not-loaded-when-running-gradle-script-from-android-studio%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
Run
source
manually?– Zoe
Mar 28 at 8:30