Skip to content

Commit

Permalink
Merge pull request webosbrew#159 from throwaway96/installRootPath-202…
Browse files Browse the repository at this point in the history
…31126

Add homebrewBaseDir to /getConfiguration method
  • Loading branch information
throwaway96 authored Dec 11, 2023
2 parents abb61e1 + 19bd0a5 commit d1898e8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions services/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ import ServiceRemote from './webos-service-remote';

const kHomebrewChannelPackageId = rootAppInfo.id;
const startDevmode = '/media/cryptofs/apps/usr/palm/services/com.palmdts.devmode.service/start-devmode.sh';
const homebrewBaseDir = ((): string | null => {
try {
return path.resolve(__dirname, '../../../../');
} catch (err) {
console.warn('getting homebrewBaseDir failed:', err);
return null;
}
})();

// Maps internal setting field name with filesystem flag name.
type FlagName = string;
Expand Down Expand Up @@ -439,6 +447,7 @@ function runService() {
const flags = Object.fromEntries(await Promise.all(futureFlags));
return {
root: process.getuid() === 0,
homebrewBaseDir,
...flags,
};
}),
Expand Down

0 comments on commit d1898e8

Please sign in to comment.