Skip to content

Commit

Permalink
fix: Initialize config.container_config in case it's undefined to avo…
Browse files Browse the repository at this point in the history
…id trying to set properties of an undefined
  • Loading branch information
vehagn committed Jan 19, 2023
1 parent d443662 commit 31e4b5a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules/
tmp/
.idea
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## [0.4.2] - 2023-01-19

### Fixed
- Initialize `config.container_config` in case it's `undefined`

## [0.4.1] - 2022-03-24

### Dependency update / security
Expand Down
1 change: 1 addition & 0 deletions appLayerCreator.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ async function addLayers(tmpdir, fromdir, todir, options) {
logger.info('Parsing image ...');
let manifest = await fse.readJson(path.join(fromdir, 'manifest.json'));
let config = await fse.readJson(path.join(fromdir, 'config.json'));
config.container_config = config.container_config || {};

logger.info('Adding new layers...');
await copyLayers(fromdir, todir, manifest.layers);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "doqr",
"version": "0.4.1",
"version": "0.4.2",
"description": "Build node.js docker images without docker",
"main": "./cli.js",
"scripts": {
Expand Down

0 comments on commit 31e4b5a

Please sign in to comment.