Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
devcontainer-features
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eazydevelop-devcontainer-temp
devcontainer-features
Commits
a5fbdab3
Unverified
Commit
a5fbdab3
authored
Sep 06, 2022
by
Samruddhi Khandale
Committed by
GitHub
Sep 06, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug - Debian / Ubuntu base conda-notice.txt error (#135)
* fix bug * move config * fix tests
parent
d8ee2e8c
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
53 additions
and
18 deletions
+53
-18
install.sh
src/anaconda/install.sh
+25
-0
install.sh
src/common-utils/install.sh
+0
-18
install.sh
src/conda/install.sh
+25
-0
test.sh
test/anaconda/test.sh
+1
-0
install_conda.sh
test/conda/install_conda.sh
+1
-0
test.sh
test/conda/test.sh
+1
-0
No files found.
src/anaconda/install.sh
View file @
a5fbdab3
...
...
@@ -103,4 +103,29 @@ if ! conda --version &> /dev/null ; then
updaterc
"export CONDA_DIR=
${
CONDA_DIR
}
/bin"
fi
# Display a notice on conda when not running in GitHub Codespaces
mkdir
-p
/usr/local/etc/vscode-dev-containers
cat
<<
'
EOF
' > /usr/local/etc/vscode-dev-containers/conda-notice.txt
When using "conda" from outside of GitHub Codespaces, note the Anaconda repository contains
restrictions on commercial use that may impact certain organizations. See https://aka.ms/ghcs-conda
EOF
notice_script
=
"
$(
cat
<<
'
EOF
'
if [ -t 1 ] && [ "
${
IGNORE_NOTICE
}
" != "true" ] && [ "
${
TERM_PROGRAM
}
" = "vscode" ] && [ "
${
CODESPACES
}
" != "true" ] && [ ! -f "
$HOME
/.config/vscode-dev-containers/conda-notice-already-displayed" ]; then
cat "/usr/local/etc/vscode-dev-containers/conda-notice.txt"
mkdir -p "
$HOME
/.config/vscode-dev-containers"
((sleep 10s; touch "
$HOME
/.config/vscode-dev-containers/conda-notice-already-displayed") &)
fi
EOF
)
"
if
[
-f
"/etc/zsh/zshrc"
]
;
then
echo
"
${
notice_script
}
"
|
tee
-a
/etc/zsh/zshrc
fi
if
[
-f
"/etc/bash.bashrc"
]
;
then
echo
"
${
notice_script
}
"
|
tee
-a
/etc/bash.bashrc
fi
echo
"Done!"
\ No newline at end of file
src/common-utils/install.sh
View file @
a5fbdab3
...
...
@@ -448,22 +448,4 @@ echo -e "\
RC_SNIPPET_ALREADY_ADDED=
${
RC_SNIPPET_ALREADY_ADDED
}
\n\
ZSH_ALREADY_INSTALLED=
${
ZSH_ALREADY_INSTALLED
}
"
>
"
${
MARKER_FILE
}
"
# Display a notice on conda when not running in GitHub Codespaces
cat
<<
'
EOF
' >
${
DEV_CONTAINERS_DIR
}
/conda-notice.txt
When using "conda" from outside of GitHub Codespaces, note the Anaconda repository contains
restrictions on commercial use that may impact certain organizations. See https://aka.ms/ghcs-conda
EOF
notice_script
=
"
$(
cat
<<
'
EOF
'
if [ -t 1 ] && [ "
${
IGNORE_NOTICE
}
" != "true" ] && [ "
${
TERM_PROGRAM
}
" = "vscode" ] && [ "
${
CODESPACES
}
" != "true" ] && [ ! -f "
$HOME
/.config/vscode-dev-containers/conda-notice-already-displayed" ]; then
cat "
${
DEV_CONTAINERS_DIR
}
/conda-notice.txt"
mkdir -p "
$HOME
/.config/vscode-dev-containers"
((sleep 10s; touch "
$HOME
/.config/vscode-dev-containers/conda-notice-already-displayed") &)
fi
EOF
)
"
echo
"
${
notice_script
}
"
|
tee
-a
/etc/bash.bashrc
>>
/etc/zsh/zshrc
echo
"Done!"
src/conda/install.sh
View file @
a5fbdab3
...
...
@@ -98,4 +98,29 @@ if ! conda --version &> /dev/null ; then
find
"
${
CONDA_DIR
}
"
-type
d
-print0
| xargs
-n
1
-0
chmod
g+s
fi
# Display a notice on conda when not running in GitHub Codespaces
mkdir
-p
/usr/local/etc/vscode-dev-containers
cat
<<
'
EOF
' > /usr/local/etc/vscode-dev-containers/conda-notice.txt
When using "conda" from outside of GitHub Codespaces, note the Anaconda repository contains
restrictions on commercial use that may impact certain organizations. See https://aka.ms/ghcs-conda
EOF
notice_script
=
"
$(
cat
<<
'
EOF
'
if [ -t 1 ] && [ "
${
IGNORE_NOTICE
}
" != "true" ] && [ "
${
TERM_PROGRAM
}
" = "vscode" ] && [ "
${
CODESPACES
}
" != "true" ] && [ ! -f "
$HOME
/.config/vscode-dev-containers/conda-notice-already-displayed" ]; then
cat "/usr/local/etc/vscode-dev-containers/conda-notice.txt"
mkdir -p "
$HOME
/.config/vscode-dev-containers"
((sleep 10s; touch "
$HOME
/.config/vscode-dev-containers/conda-notice-already-displayed") &)
fi
EOF
)
"
if
[
-f
"/etc/zsh/zshrc"
]
;
then
echo
"
${
notice_script
}
"
|
tee
-a
/etc/zsh/zshrc
fi
if
[
-f
"/etc/bash.bashrc"
]
;
then
echo
"
${
notice_script
}
"
|
tee
-a
/etc/bash.bashrc
fi
echo
"Done!"
test/anaconda/test.sh
View file @
a5fbdab3
...
...
@@ -7,6 +7,7 @@ source dev-container-features-test-lib
# Definition specific tests
check
"version"
conda
--version
check
"if conda-notice.txt exists"
cat
/usr/local/etc/vscode-dev-containers/conda-notice.txt
# Report result
reportResults
\ No newline at end of file
test/conda/install_conda.sh
View file @
a5fbdab3
...
...
@@ -7,6 +7,7 @@ source dev-container-features-test-lib
check
"conda"
conda
--version
|
grep
4.12.0
check
"conda-forge"
conda config
--show
channels |
grep
conda-forge
check
"if conda-notice.txt exists"
cat
/usr/local/etc/vscode-dev-containers/conda-notice.txt
# Report result
reportResults
test/conda/test.sh
View file @
a5fbdab3
...
...
@@ -7,6 +7,7 @@ source dev-container-features-test-lib
# Definition specific tests
check
"version"
conda
--version
check
"if conda-notice.txt exists"
cat
/usr/local/etc/vscode-dev-containers/conda-notice.txt
# Report result
reportResults
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment