diff --git a/src/sos/eval.py b/src/sos/eval.py index 152036b01..ec3c96c17 100644 --- a/src/sos/eval.py +++ b/src/sos/eval.py @@ -298,6 +298,9 @@ def SoS_exec(script: str, if _dict is None: _dict = env.sos_dict.dict() + if not 'sos_tagets' in _dict: + exec('from sos.runtime import *', _dict) + if not return_result: if env.verbosity == 0: with contextlib.redirect_stdout(None): @@ -505,4 +508,4 @@ def analyze_global_statements(global_stmt): f"Variable {key} cannot be defined in global section because it cannot be pickled to workers." ) from e return global_def, global_vars - \ No newline at end of file +