Skip to content

Commit 99a30cb

Browse files
author
Test
committed
fix: replace GNU find -printf with portable approach, restore localhost to allowedHosts
Change-Id: Id3cc5264536b32ea6b38453ec5d9cfcb42b841e3 Signed-off-by: Test <test@example.com>
1 parent 8cac0ac commit 99a30cb

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/utils/scripts/discovery.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ export async function listScripts(runtime: Runtime, workspacePath: string): Prom
2727

2828
try {
2929
// List files in .cmux/scripts/ directory via runtime
30-
// Using find with -maxdepth 1 to list only files in the directory (not subdirectories)
30+
// Using find -print (portable) with basename to extract filenames
3131
const listResult = await execBuffered(
3232
runtime,
33-
`find "${scriptsDir}" -maxdepth 1 -type f -printf '%f\\n' 2>/dev/null | sort || true`,
33+
`find "${scriptsDir}" -maxdepth 1 -type f -print 2>/dev/null | while read f; do basename "$f"; done | sort || true`,
3434
{
3535
cwd: workspacePath,
3636
timeout: 5,

vite.config.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@ export default defineConfig(({ mode }) => ({
8989
host: devServerHost, // Configurable via MUX_VITE_HOST (defaults to 127.0.0.1 for security)
9090
port: devServerPort,
9191
strictPort: true,
92-
// allowedHosts: devServerHost === "0.0.0.0" ? undefined : ["localhost", "127.0.0.1"],
93-
allowedHosts: ["coderbook-pro.manakin-ray.ts.net"],
92+
allowedHosts: ["localhost", "127.0.0.1", "coderbook-pro.manakin-ray.ts.net"],
9493
sourcemapIgnoreList: () => false, // Show all sources in DevTools
9594

9695
watch: {

0 commit comments

Comments
 (0)