This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push: new c82aa9f68 config.nims: fix NimSuggest crash. c82aa9f68 is described below commit c82aa9f683ff50a0d3e704da01abae21684f62d1 Author: Takeyoshi Kikuchi <kiku...@centurysys.co.jp> AuthorDate: Tue Jan 23 16:05:45 2024 +0900 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 <kiku...@centurysys.co.jp> --- config.nims | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config.nims b/config.nims index 265573217..1bf0ac25b 100644 --- a/config.nims +++ b/config.nims @@ -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()