fix: hide workspace dependency directories
This commit is contained in:
@@ -276,7 +276,7 @@ class DockerExecutionProvider:
|
|||||||
"if not root.is_dir(): raise SystemExit(f'Not a directory: {root}')\n"
|
"if not root.is_dir(): raise SystemExit(f'Not a directory: {root}')\n"
|
||||||
"items=[]\n"
|
"items=[]\n"
|
||||||
"for item in root.iterdir():\n"
|
"for item in root.iterdir():\n"
|
||||||
" if item.name=='.agent': continue\n"
|
" if item.name in {'.agent','.venv','__pycache__','node_modules'}: continue\n"
|
||||||
" try: info=item.lstat()\n"
|
" try: info=item.lstat()\n"
|
||||||
" except OSError: continue\n"
|
" except OSError: continue\n"
|
||||||
" kind='symlink' if item.is_symlink() else ('directory' if item.is_dir() else 'file')\n"
|
" kind='symlink' if item.is_symlink() else ('directory' if item.is_dir() else 'file')\n"
|
||||||
|
|||||||
@@ -56,6 +56,9 @@ async def test_real_docker_workspaces_are_isolated(settings) -> None:
|
|||||||
hidden = await provider.list_files(users[0], ".", 4, 100)
|
hidden = await provider.list_files(users[0], ".", 4, 100)
|
||||||
assert ".agent" not in hidden.output
|
assert ".agent" not in hidden.output
|
||||||
assert ".venv" not in hidden.output
|
assert ".venv" not in hidden.output
|
||||||
|
browser_listing = await provider.browse_files(users[0], ".")
|
||||||
|
assert ".agent" not in {entry.name for entry in browser_listing.entries}
|
||||||
|
assert ".venv" not in {entry.name for entry in browser_listing.entries}
|
||||||
|
|
||||||
piped_failure = await provider.exec(users[0], "false | tail -n 1", ".", 10)
|
piped_failure = await provider.exec(users[0], "false | tail -n 1", ".", 10)
|
||||||
assert not piped_failure.ok
|
assert not piped_failure.ok
|
||||||
|
|||||||
Reference in New Issue
Block a user