Skip to content

Commit

Permalink
fix(api): give real host mount priority over docker host mount
Browse files Browse the repository at this point in the history
fixes #188
  • Loading branch information
MauriceNino committed Jul 7, 2022
1 parent 45a2e74 commit 796c44b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions apps/api/src/dynamic-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,10 @@ export const getDynamicServerInfo = () => {
mount.startsWith('/mnt/host/') && !INVALID_FS_TYPES.includes(type)
);
const hostMountUsed =
sizes.filter(({ mount }) => mount === '/mnt/host' || mount === '/')[0]
?.used ?? 0;
(
sizes.find(({ mount }) => mount === '/mnt/host') ??
sizes.find(({ mount }) => mount === '/')
)?.used ?? 0;
const validParts = blocks.filter(({ type }) => type === 'part');

let hostFound = false;
Expand Down

0 comments on commit 796c44b

Please sign in to comment.