summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/terminal.bbclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/terminal.bbclass b/meta/classes/terminal.bbclass
index 73e765d57a..6059ae95e0 100644
--- a/meta/classes/terminal.bbclass
+++ b/meta/classes/terminal.bbclass
@@ -14,6 +14,7 @@ def oe_terminal_prioritized():
14 return " ".join(o.name for o in oe.terminal.prioritized()) 14 return " ".join(o.name for o in oe.terminal.prioritized())
15 15
16def emit_terminal_func(command, envdata, d): 16def emit_terminal_func(command, envdata, d):
17 import bb.build
17 cmd_func = 'do_terminal' 18 cmd_func = 'do_terminal'
18 19
19 envdata.setVar(cmd_func, 'exec ' + command) 20 envdata.setVar(cmd_func, 'exec ' + command)
@@ -25,8 +26,7 @@ def emit_terminal_func(command, envdata, d):
25 bb.utils.mkdirhier(os.path.dirname(runfile)) 26 bb.utils.mkdirhier(os.path.dirname(runfile))
26 27
27 with open(runfile, 'w') as script: 28 with open(runfile, 'w') as script:
28 script.write('#!/usr/bin/env %s\n' % d.getVar('SHELL')) 29 script.write(bb.build.shell_trap_code())
29 script.write('set -e\n')
30 bb.data.emit_func(cmd_func, script, envdata) 30 bb.data.emit_func(cmd_func, script, envdata)
31 script.write(cmd_func) 31 script.write(cmd_func)
32 script.write("\n") 32 script.write("\n")