You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My shell was in a temporary directory that has been deleted since I cd'd in there. Running semgrep failed with this:
❯ semgrep -e 'echo' -l bash ~/r2c/semgrep/.github/post-checkout
Traceback (most recent call last):
File "/opt/homebrew/bin/semgrep", line 33, in <module>
sys.exit(load_entry_point('semgrep==0.84.0', 'console_scripts', 'semgrep')())
File "/opt/homebrew/Cellar/semgrep/0.84.0/libexec/lib/python3.10/site-packages/semgrep/__main__.py", line 20, in main
cli()
File "/opt/homebrew/Cellar/semgrep/0.84.0/libexec/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/opt/homebrew/Cellar/semgrep/0.84.0/libexec/lib/python3.10/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/opt/homebrew/Cellar/semgrep/0.84.0/libexec/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/homebrew/Cellar/semgrep/0.84.0/libexec/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/homebrew/Cellar/semgrep/0.84.0/libexec/lib/python3.10/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/opt/homebrew/Cellar/semgrep/0.84.0/libexec/lib/python3.10/site-packages/semgrep/commands/scan.py", line 816, in scan
) = semgrep.semgrep_main.main(
File "/opt/homebrew/Cellar/semgrep/0.84.0/libexec/lib/python3.10/site-packages/semgrep/semgrep_main.py", line 298, in main
all_rules = configs_obj.get_rules(no_rewrite_rule_ids)
File "/opt/homebrew/Cellar/semgrep/0.84.0/libexec/lib/python3.10/site-packages/semgrep/config_resolver.py", line 312, in get_rules
self._rename_rule_ids(configs)
File "/opt/homebrew/Cellar/semgrep/0.84.0/libexec/lib/python3.10/site-packages/semgrep/config_resolver.py", line 347, in _rename_rule_ids
f"{Config._convert_config_id_to_prefix(config_id)}{rule.id or MISSING_RULE_ID}"
File "/opt/homebrew/Cellar/semgrep/0.84.0/libexec/lib/python3.10/site-packages/semgrep/config_resolver.py", line 335, in _convert_config_id_to_prefix
at_path = Config._safe_relative_to(at_path, Path.cwd())
File "/opt/homebrew/Cellar/python@3.10/3.10.2/Frameworks/Python.framework/Versions/3.10/lib/python3.10/pathlib.py", line 991, in cwd
return cls(cls._accessor.getcwd())
FileNotFoundError: [Errno 2] No such file or directory
so to reproduce:
mkdir temp
cd temp
(in another shell) rm temp
(in first shell) run semgrep
using semgrep 0.84
The text was updated successfully, but these errors were encountered:
My shell was in a temporary directory that has been deleted since I cd'd in there. Running semgrep failed with this:
so to reproduce:
using semgrep 0.84
The text was updated successfully, but these errors were encountered: