mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-21 02:01:35 +00:00
Fix bug where a promise was not resolved in db-format
Change-type: patch Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
parent
5337c0102c
commit
270f9f854a
@ -66,20 +66,28 @@ async function buildApp(dbApp: targetStateCache.DatabaseApp) {
|
||||
},
|
||||
);
|
||||
|
||||
const opts = await config.get('extendedEnvOptions');
|
||||
const supervisorApiHost = dockerUtils
|
||||
.getNetworkGateway(constants.supervisorNetworkInterface)
|
||||
.catch(() => '127.0.0.1');
|
||||
const hostPathExists = {
|
||||
firmware: await pathExistsOnHost('/lib/firmware'),
|
||||
modules: await pathExistsOnHost('/lib/modules'),
|
||||
};
|
||||
const hostnameOnHost = _.trim(
|
||||
await fs.readFile(
|
||||
path.join(constants.rootMountPoint, '/etc/hostname'),
|
||||
'utf8',
|
||||
),
|
||||
);
|
||||
const [
|
||||
opts,
|
||||
supervisorApiHost,
|
||||
hostPathExists,
|
||||
hostnameOnHost,
|
||||
] = await Promise.all([
|
||||
config.get('extendedEnvOptions'),
|
||||
dockerUtils
|
||||
.getNetworkGateway(constants.supervisorNetworkInterface)
|
||||
.catch(() => '127.0.0.1'),
|
||||
(async () => ({
|
||||
firmware: await pathExistsOnHost('/lib/firmware'),
|
||||
modules: await pathExistsOnHost('/lib/modules'),
|
||||
}))(),
|
||||
(async () =>
|
||||
_.trim(
|
||||
await fs.readFile(
|
||||
path.join(constants.rootMountPoint, '/etc/hostname'),
|
||||
'utf8',
|
||||
),
|
||||
))(),
|
||||
]);
|
||||
|
||||
const svcOpts = {
|
||||
appName: dbApp.name,
|
||||
|
Loading…
x
Reference in New Issue
Block a user