github.com/upcmd/up@v0.8.1-0.20230108151705-ad8b797bf04f/tests/functests/e0200.yml (about)

     1  notes: |
     2    ## Use pure env
     3  
     4    There are two ways you can use pure env, which unset all preset/inherited environment variales
     5  
     6    * use --pure in command arg
     7    * use pure in config
     8  
     9    Note that only the Pure config entry in entry module of upconfig.yml will be used, but not every module's, as one pure env setting up will unset all current session context env vars to empty and this is to ensure that the pure operation is always from caller session
    10  
    11    ### Run the example
    12  
    13    up ngo task -d ./tests/functests -t e200.yml --configdir=./tests/functests --pure
    14  
    15    ### Demo to call the default task
    16  
    17    ```
    18    Ξ /up-project/up git:(master) ▶  up ngo task -d ./tests/functests -t wip.yml -i dev --configdir=./tests/functests --pure
    19    loading [Config]:  ./tests/functests/upconfig.yml
    20    true
    21    Main config:
    22                 Version -> 1.0.0
    23                  RefDir -> ./tests/functests
    24                 WorkDir -> cwd
    25              AbsWorkDir -> /up-project/up
    26                TaskFile -> wip.yml
    27                 Verbose -> v
    28              ModuleName -> self
    29               ShellType -> /bin/sh
    30           MaxCallLayers -> 8
    31                 Timeout -> 3600000
    32     MaxModuelCallLayers -> 256
    33               EntryTask -> task
    34    work dir: /up-project/up
    35    -exec task: task
    36    loading [Task]:  ./tests/functests/wip.yml
    37    -set pure env context done.
    38    module: [self], instance id: [dev], exec profile: []
    39    Task1: [task ==> task:  ]
    40    -Step1:
    41    cmd( 1):
    42    -
    43    my env vars:
    44    PWD=/up-project/up
    45    SHLVL=1
    46    _=/usr/bin/env
    47  
    48    -
    49     .. ok
    50    . ok
    51    ```
    52  
    53  
    54  tasks:
    55  
    56    -
    57      name: task
    58      task:
    59        -
    60          func: shell
    61          do: |
    62            echo """my vars:"""
    63            env|grep =