Skip to content

Commit

Permalink
ci skip
Browse files Browse the repository at this point in the history
  • Loading branch information
hustcer committed Sep 10, 2023
1 parent 107a56b commit 2cf0585
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
14 changes: 1 addition & 13 deletions .github/workflows/module-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,9 @@ jobs:
env:
ACTIONS_STEP_DEBUG: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Show NU_LIB_DIRS
run: |
print 'Current NU_LIB_DIRS: '
print $env.NU_LIB_DIRS
- name: Cp Your Modules to NU_LIB_DIRS
run: |
let LIB_DIR = ($nu.config-path | path dirname | path join 'scripts')
mkdir $LIB_DIR
cp ./nu/common.nu $LIB_DIR
print 'Available Nu Modules:'
# FIXME: Show available modules
print $env.NU_LIB_DIRS
- name: Use Your Nu Modules In the Following Steps
run: |
use nu/common.nu [get-env]
use module.nu [get-env]
print $env.PWD
print (get-env 'ABC-XYZ' 'DEFAULT-ABC-XYZ')
Expand Down
14 changes: 14 additions & 0 deletions module.nu
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env nu
# Author: hustcer
# Created: 2023/09/10 18:36:56
# Usage:
# use source command to load it


# Get the specified env key's value or ''
export def 'get-env' [
key: string # The key to get it's env value
default?: string # The default value for an empty env
] {
$env | get -i $key | default $default
}

0 comments on commit 2cf0585

Please sign in to comment.