how to inherit father terminal bash env
还没有人认领这个 Issue。
评估
调研方向
Start with plenary.nvim/lua/plenary/job.lua around line 108 and review the Job:new invocation shown in the issue, especially vim.fn.environ(), env, command, and cwd. Reproduce the bitbake launch from Neovim and compare it with the working terminal environment; done means the job can locate and run bitbake without the reported executable-not-found error.
由索引模型根据 Issue 内容生成。
描述
i use code:
-- Get the current environment and modify it if needed
local myenv = vim.fn.environ()
-- Use plenary.job to capture output
local Job = require('plenary.job')
Job:new({
command = 'bitbake ',
args = { foldname },
cwd = project_root,
env = myenv, -- Inherit and extend the current environment
on_exit = function(j, return_val)
-- Send output to Quickfix
vim.fn.setqflist({}, ' ', {
title = 'Bitbake Output',
lines = j:result(),
})
-- Open Quickfix window
vim.cmd('botright copen 6')
end,
}):start()
run result:
E5108: Error executing lua: .../site/pack/packer/start/plenary.nvim/lua/plenary/job.lua:108: bitbake : Executable not found
the bitbake command is load in the terminal; how can i fix this problem
- 主要语言
- Lua
- 星标
- 3.5k
- 派生
- 340
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nvim-lua/plenary.nvim 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 88/100
nvim-lua/plenary.nvim#682 ·
-
uniform usage of `os.getenv`可能已有人在做 @rakotomandimby 于 125 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 72/100
nvim-lua/plenary.nvim#680 ·
-
难度 2/5 1-3 小时 新手友好度 45/100
nvim-lua/plenary.nvim#675 ·
-
难度 4/5 3-5 天 新手友好度 28/100
nvim-lua/plenary.nvim#672 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 25/100
nvim-lua/plenary.nvim#671 · 1 条评论 ·
查看 nvim-lua/plenary.nvim 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
documentation enhancement
难度 2/5 1-3 小时 新手友好度 62/100
EmirErtorer/ink-away.koplugin#38 · 1 条评论 ·
-
Feature Request
难度 2/5 1-3 小时 新手友好度 62/100
Questie/QuestieTrace#92 ·
维护者通常 1 天内回复
-
bug
难度 1/5 1 小时以内 新手友好度 85/100
维护者通常 1 天内回复
-
Witch未关闭
难度 1/5 1 小时以内 新手友好度 88/100
LuaLS/lua-language-server#3471 ·