Skip to content

Commit

Permalink
Verify the support of WSL (#274)
Browse files Browse the repository at this point in the history
* Update install-nplinker-deps

* update doc and readme

* fix typo
  • Loading branch information
CunliangGeng committed Sep 12, 2024
1 parent a63b294 commit eaf3b43
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Original paper: [Ranking microbial metabolomic and genomic links in the NPLinker
## Setup and usage

### Requirement
- Linux or MacOS
- Linux, MacOS or [Windows with WSL](https://learn.microsoft.com/en-us/windows/wsl/)
- Python version ≥3.9


Expand Down
13 changes: 8 additions & 5 deletions bin/install-nplinker-deps
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,14 @@ else
exit
fi

# check the path of this script
if [[ $(command -v install-nplinker-deps) != $PY_PATH/bin/install-nplinker-deps ]]; then
echo "❌ Error: command `install-nplinker-deps` invoked from bad path;"
echo "Please install nplinker with `pip install nplinker` and then re-run this command."
exit
script_path=$(command -v install-nplinker-deps)
expected_path="$PY_PATH/bin/install-nplinker-deps"

if [[ $script_path != $expected_path ]]; then
echo "❌ Error: command 'install-nplinker-deps' invoked from an incorrect path or enviroment: $script_path"
echo "Please ensure that it is invoked from the expected path: $expected_path."
echo "Check your PATH environment variable to correct the execution order of paths."
exit 1
fi

# create dependecy install path
Expand Down
2 changes: 1 addition & 1 deletion docs/install.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

???- Note "Requirements"
- Linux or MacOS
- Linux, MacOS or [Windows with WSL](https://learn.microsoft.com/en-us/windows/wsl/)
- Python version ≥3.9


Expand Down

0 comments on commit eaf3b43

Please sign in to comment.