volumes: only wait for 5 seconds for mount status
mountpoint -q can never exit if the nfs mount disappears, for example
This commit is contained in:
@@ -257,7 +257,8 @@ async function testConfig(apiConfig) {
|
||||
}
|
||||
|
||||
if (apiConfig.provider === PROVIDER_MOUNTPOINT) {
|
||||
if (!safe.child_process.execSync(`mountpoint -q -- ${apiConfig.mountPoint}`)) throw new BoxError(BoxError.BAD_FIELD, `${apiConfig.mountPoint} is not mounted`);
|
||||
const [error] = await safe(shell.exec(`mountpoint -q -- ${apiConfig.mountPoint}`, { timeout: 5000 }));
|
||||
if (error) throw new BoxError(BoxError.BAD_FIELD, `${apiConfig.mountPoint} is not mounted: ${error.message}`);
|
||||
}
|
||||
|
||||
const rootPath = apiConfig.rootPath;
|
||||
|
||||
Reference in New Issue
Block a user