mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-15 17:33:23 +00:00
config.nims: fix NimSuggest crash.
When editing in VSCode, NimSuggest refers to config.nims and tries to find the NuttX .config. Fixed a problem that .config cannot be read because the environment variable "TOPDIR" is not defined. Signed-off-by: Takeyoshi Kikuchi <kikuchi@centurysys.co.jp>
This commit is contained in:
parent
dabdad732e
commit
c82aa9f683
1 changed files with 2 additions and 1 deletions
|
|
@ -127,6 +127,7 @@ proc setup_cfg(cfg: DotConfig) =
|
|||
switch("define", "nimMemAlignTiny")
|
||||
|
||||
|
||||
let topdir = getEnv("TOPDIR")
|
||||
const key = "TOPDIR"
|
||||
let topdir = if existsEnv(key): getEnv(key) else: thisDir() & "/../nuttx"
|
||||
let cfg = read_config(topdir & "/.config")
|
||||
cfg.setup_cfg()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue