Skip to content

how to inherit father terminal bash env #655

@pzh2386034

Description

@pzh2386034

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions