segmentation violation
message when passing Dockerfile
via --rootfs
option with a bad location of the Kraftfile
to kraft build
#2035
Labels
kind/bug
Something isn't working
Describe the bug
This is a quite specific setup that results in a
segmentation violation
message being outputted bykraft build
. The command must feature:a) the
--rootfs
option with a path using theDockerfile
word; the path may be correct or notb) the
--kraftfile
/-K
option with a path to a missingKraftfile
, i.e. the path is incorectRunning the command will result in a
SIGSEGV
being delivered, and asegmentation violation
message being outputted.Steps to reproduce
Use the command below anywhere. No need for valid paths:
kraft build --rootfs ./Dockerfile -K /Kraftfile .
It will result in a
segmentation violation
message being delivered. TheDockerfile
may exist or not.Note that the
--rootfs
option must be passed a string with theDockefile
argument. These commands result in the same behavior:The path to the
Kraftfile
(the argument to the-K
option) must be an missing path. These commands result in the same behavior, as long as theKraftfile
path is incorrect:This behavior will not happen if:
A. the
Kraftfile
exists andB. the
Kraftfile
contains thespec
and therootfs
options insideFor example, this happens:
Expected behavior
The command should print out an error such as missing
Kraftfile
or badly formattedKraftfile
, instead of issuing asegmentation violation
message.Which architectures were you using or does this bug affect?
No response
Which operating system were you using or does this bug affect?
linux/debian
Relevant log output
The text was updated successfully, but these errors were encountered: