Fix a panic that could occur when context was omitted (#83)
I could have sworn the context property was required, but evidently it isn't and we weren't handling the case when it was missing. This PR updates things to set a default location of the current directory if the context is absent. Some unit tests are also added. Fixes #78.
This commit is contained in:
@@ -1165,7 +1165,7 @@
|
||||
},
|
||||
"context": {
|
||||
"$ref": "#/types/docker-build:index:BuildContext",
|
||||
"description": "Build context settings.\n\nEquivalent to Docker's `PATH | URL | -` positional argument."
|
||||
"description": "Build context settings. Defaults to the current directory.\n\nEquivalent to Docker's `PATH | URL | -` positional argument."
|
||||
},
|
||||
"contextHash": {
|
||||
"type": "string",
|
||||
@@ -1309,7 +1309,7 @@
|
||||
},
|
||||
"context": {
|
||||
"$ref": "#/types/docker-build:index:BuildContext",
|
||||
"description": "Build context settings.\n\nEquivalent to Docker's `PATH | URL | -` positional argument."
|
||||
"description": "Build context settings. Defaults to the current directory.\n\nEquivalent to Docker's `PATH | URL | -` positional argument."
|
||||
},
|
||||
"dockerfile": {
|
||||
"$ref": "#/types/docker-build:index:Dockerfile",
|
||||
|
||||
Reference in New Issue
Block a user