Skip to content

Commit f5ff3fd

Browse files
Remove debug console.log and fix parameter usage in readConfig.
1 parent c6ef936 commit f5ff3fd

3 files changed

Lines changed: 2 additions & 6 deletions

File tree

dist/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34550,7 +34550,6 @@ const filePath = (config, filename) => `${config.directory}/${filename}`;
3455034550
const fileExists = (config, filename) => fs.existsSync(filePath(config, filename));
3455134551
exports.fileExists = fileExists;
3455234552
const readFile = (config, filename) => {
34553-
console.log(filePath(config, filename), fs.existsSync(filePath(config, filename)));
3455434553
if (!fs.existsSync(filePath(config, filename))) {
3455534554
return '';
3455634555
}
@@ -34563,7 +34562,7 @@ const writeFile = (config, filename, content) => {
3456334562
exports.writeFile = writeFile;
3456434563
const readConfig = (override, userConfigPath, baseConfig = undefined) => {
3456534564
const dataConfig = baseConfig ?? config_1.defaultConfig;
34566-
const content = (0, exports.readFile)(dataConfig, userConfigPath);
34565+
const content = (0, exports.readFile)(override, userConfigPath);
3456734566
if (content === '') {
3456834567
return (0, deepmerge_ts_1.deepmerge)(dataConfig, override);
3456934568
}

src/utils/filesystem.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ const filePath = (config: Config, filename: string): string => `${ config.direct
2020
export const fileExists = (config: Config, filename: string): boolean => fs.existsSync(filePath(config, filename))
2121

2222
export const readFile = (config: Config, filename: string): string => {
23-
console.log(filePath(config, filename),fs.existsSync(filePath(config, filename)))
24-
2523
if (! fs.existsSync(filePath(config, filename))) {
2624
return ''
2725
}
@@ -36,7 +34,7 @@ export const writeFile = (config: Config, filename: string, content: string): vo
3634
export const readConfig = (override: Config, userConfigPath: string, baseConfig: Config | undefined = undefined): Config => {
3735
const dataConfig: Config = baseConfig ?? defaultConfig
3836

39-
const content: string = readFile(dataConfig, userConfigPath)
37+
const content: string = readFile(override, userConfigPath)
4038

4139
if (content === '') {
4240
return <Config>deepmerge(dataConfig, override)

src/utils/image.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ const detectPackageManager = (config: Config, visibility: string): string => {
2626
}
2727

2828
const packageManager = (config: Config): string => {
29-
3029
const visibility = config.image.parameters.packageGlobal ? ' global' : ''
3130

3231
switch (config.image.parameters.packageManager) {

0 commit comments

Comments
 (0)