Skip to content
Snippets Groups Projects
Commit ef2b3395 authored by Skander Hatira's avatar Skander Hatira
Browse files

better fix for conda path from non interactive shells

parent 2af17e42
No related branches found
No related tags found
No related merge requests found
Pipeline #41836 failed
#!/bin/bash
id -u
echo $0
command -v conda
# env
# echo "#######################"
# if ! [ "$(command -v conda)" ]; then
# if [ -f $HOME/miniconda3/etc/profile.d/conda.sh ]
# then
# source $HOME/miniconda3/etc/profile.d/conda.sh
# if ! [ "$(command -v conda)" ]; then
# echo 'Error: Please Make Sure conda is in your $PATH.' >&2
# fi
# fi
# fi
#!/bin/bash
if [ -f ~/.$(basename $SHELL)rc ]; then
source ~/.$(basename $SHELL)rc
elif [ -f ~/bash_profile ]; then
source ~/bash_profile
fi
\ No newline at end of file
......@@ -7,7 +7,10 @@ const spawnChild = async (body, profile, uniqueDir, homeDir, unlock) => {
const logfile = path.join(uniqueDir, "biseps.txt");
const output = fs.openSync(logfile, "a");
const workflow = path.join(__dirname, "../resources/biseps/");
const command = process.platform == "win32" ? "conda" : `conda`;
const command =
process.platform == "win32"
? "conda"
: `$(head -n 1 $HOME/.conda/environments.txt)/bin/conda`;
const options = {
slient: false,
// detached: true,
......
......@@ -7,7 +7,10 @@ const spawnChild = async () => {
const homedir = require("os").homedir();
const logfile = path.join(homedir, "mongoWindow.txt");
const output = fs.openSync(logfile, "a");
const command = process.platform == "win32" ? "conda" : `conda`;
const command =
process.platform == "win32"
? "conda"
: `$(head -n 1 $HOME/.conda/environments.txt)/bin/conda`;
const options = {
slient: false,
......
......@@ -30,7 +30,7 @@ console.log(bisepsTemp);
console.log(process.platform);
process.platform == "darwin" || process.platform == "linux"
? exec(
"bash " + path.join(__dirname, "resources/checkConda.sh"),
`${process.platform == "win32" ? "where conda" : "command -v conda"}`,
(error, stdout, stderr) => {
if (error) {
console.log(`error: ${error.message}`);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment