MCPcopy Create free account
hub / github.com/vercel/vercel / getUnsafeFileReason

Function getUnsafeFileReason

packages/cli-exec/src/safety.ts:176–184  ·  view source on GitHub ↗

* Reports unsafe ownership or write permissions for a file path.

(filePath: string)

Source from the content-addressed store, hash-verified

174 * Reports unsafe ownership or write permissions for a file path.
175 */
176async function getUnsafeFileReason(filePath: string): Promise<string | null> {
177 const stats = await stat(filePath);
178
179 if (!stats.isFile()) {
180 return 'not a file';
181 }
182
183 return getUnsafeStatsReason(stats);
184}
185
186/**
187 * Reports unsafe ownership or write permissions from filesystem metadata.

Callers 1

Calls 3

statFunction · 0.85
getUnsafeStatsReasonFunction · 0.85
isFileMethod · 0.45

Tested by

no test coverage detected