Skip to content

Commit

Permalink
Merge pull request #255 from vitalygashkov/next
Browse files Browse the repository at this point in the history
Fixed service config behavior, improved PATH user env setting, default archiver changed to system built-in `tar`
  • Loading branch information
vitalygashkov authored Nov 29, 2024
2 parents 7f6ca60 + f594e53 commit 31723bc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion apps/cli
Submodule cli updated from 836134 to 978bcc
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 9 additions & 6 deletions packages/core/lib/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@ import { getSettings } from './settings';
import { importCookies } from './cookies';

const createStorePath = (name: string) => {
// TODO: Make new store filename format
// const storePath = join(getSettings().servicesDir, `${name}.json`);
// if (fs.exists(storePath)) return storePath;

// Old store support
const oldStoreDir = initDir(join(getSettings().servicesDir, name));
const oldStorePath = join(oldStoreDir, 'config.json');
const storePath = join(getSettings().servicesDir, `${name}.json`);
// Migrate from old store to new store
if (fs.exists(oldStorePath)) {
fs.renameSync(oldStorePath, storePath);
fs.delete(oldStorePath).then(() => fs.delete(oldStoreDir));
}
return storePath;
// if (fs.exists(oldStorePath)) {
// fs.readText(oldStorePath).then((data) => fs.writeText(storePath, data));
// }
return oldStorePath;
};

const getCookiesFromTxt = async (dir: string) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/molnia

0 comments on commit 31723bc

Please sign in to comment.