Przeglądaj źródła

Initialize `$envvars_array` to an empty list.

With strict debugging, i.e. `Set-PSDebug -strict`, execution of export.ps1 will
report the following error:

```
The variable '$envars_array' cannot be retrieved because it has not been set.
At C:\path\to\export.ps1:15 char:1
+ $envars_array # will be filled like:
+ ~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (envars_array:String) [], RuntimeException
    + FullyQualifiedErrorId : VariableIsUndefined
```

Closes https://github.com/espressif/esp-idf/pull/7819
Chris Mumford 4 lat temu
rodzic
commit
4975197d1d
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      export.ps1

+ 1 - 1
export.ps1

@@ -12,7 +12,7 @@ $OLD_PATH = $env:PATH.split($S) | Select-Object -Unique # array without duplicat
 $envars_raw = python $IDF_PATH/tools/idf_tools.py export --format key-value
 if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } # if error
 
-$envars_array # will be filled like:
+$envars_array = @() # will be filled like:
 #               [
 #                    [vname1, vval1], [vname2, vval2], ...
 #               ]