Skip to content

how to inherit father terminal bash env #655

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions