-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[python] Change the
sudo_if
function to avoid issues with Bash (#694)
* [python] Updated `sudo_if` function - Remove double quotes to avoid issues with string tokenization * Add test scenario * Revert "Add test scenario" This reverts commit 9e62a37. * Update `jupyterlab git` package name * Bump feature version * Test: Install jupyterlab under root user * Refactor changes * Bump patch version * Address review points
- Loading branch information
1 parent
e7f7d19
commit 0d2fc3a
Showing
7 changed files
with
97 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Optional: Import test library | ||
source dev-container-features-test-lib | ||
|
||
# Check for an installation of JupyterLab | ||
check "version" jupyter lab --version | ||
|
||
# Check location of JupyterLab installation | ||
packages="$(python3 -m pip list)" | ||
check "location" grep jupyter <<< "$packages" | ||
|
||
# Check for git extension | ||
check "jupyterlab_git" grep jupyterlab_git <<< "$packages" | ||
|
||
# Check for correct JupyterLab configuration | ||
check "config" grep ".*.allow_origin = '*'" /root/.jupyter/jupyter_server_config.py | ||
|
||
# Report result | ||
reportResults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Optional: Import test library | ||
source dev-container-features-test-lib | ||
|
||
# Check for an installation of JupyterLab | ||
check "version" jupyter lab --version | ||
|
||
# Check location of JupyterLab installation | ||
packages="$(python3 -m pip list)" | ||
check "location" grep jupyter <<< "$packages" | ||
|
||
# Check for git extension | ||
check "jupyterlab_git" grep jupyterlab_git <<< "$packages" | ||
|
||
# Check for correct JupyterLab configuration | ||
check "config" grep ".*.allow_origin = '*'" /root/.jupyter/jupyter_server_config.py | ||
|
||
# Report result | ||
reportResults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters