Skip to content

Commit

Permalink
fix: restore self_path variable (#396)
Browse files Browse the repository at this point in the history
  • Loading branch information
juanpicado authored Mar 29, 2021
1 parent e33b050 commit b369102
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions plugins/local-storage/src/local-database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class LocalDatabase extends TokenActions implements IPluginStorage<{}> {
public search(onPackage: Callback, onEnd: Callback, validateName: (name: string) => boolean): void {
const storages = this._getCustomPackageLocalStorages();
debug(`search custom local packages: %o`, JSON.stringify(storages));
const base = Path.dirname(this.config.config_path);
const base = Path.dirname(this.config.self_path);
const self = this;
const storageKeys = Object.keys(storages);
debug(`search base: %o keys: %o`, base, storageKeys);
Expand Down Expand Up @@ -193,7 +193,7 @@ class LocalDatabase extends TokenActions implements IPluginStorage<{}> {
}

const packageStoragePath: string = Path.join(
Path.resolve(Path.dirname(this.config.config_path || ''), packagePath),
Path.resolve(Path.dirname(this.config.self_path || ''), packagePath),
packageName
);

Expand Down
2 changes: 1 addition & 1 deletion plugins/local-storage/tests/__mocks__/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default class Config {
},
];

this.config_path = './tests/__fixtures__/config.yaml';
this.self_path = './tests/__fixtures__/config.yaml';

this.https = {
enable: false,
Expand Down

0 comments on commit b369102

Please sign in to comment.