@@ -62,6 +62,7 @@ var buildTests = []func(t *testing.T, sb integration.Sandbox){
6262 testBuildProgress ,
6363 testBuildAnnotations ,
6464 testBuildBuildArgNoKey ,
65+ testBuildBuildKitSyntaxEmpty ,
6566 testBuildLabelNoKey ,
6667 testBuildCacheExportNotSupported ,
6768 testBuildOCIExportNotSupported ,
@@ -759,6 +760,14 @@ func testBuildBuildArgNoKey(t *testing.T, sb integration.Sandbox) {
759760 require .Equal (t , `ERROR: invalid key-value pair "=TEST_STRING": empty key` , strings .TrimSpace (string (out )))
760761}
761762
763+ func testBuildBuildKitSyntaxEmpty (t * testing.T , sb integration.Sandbox ) {
764+ dir := createTestProject (t )
765+ cmd := buildxCmd (sb , withArgs ("build" , "--build-arg" , "BUILDKIT_SYNTAX=" , dir ))
766+ out , err := cmd .CombinedOutput ()
767+ require .Error (t , err , string (out ))
768+ require .Contains (t , string (out ), `empty BUILDKIT_SYNTAX build-arg is invalid, use --build-arg BUILDKIT_SYNTAX without '=' for optional behavior` )
769+ }
770+
762771func testBuildLabelNoKey (t * testing.T , sb integration.Sandbox ) {
763772 dir := createTestProject (t )
764773 cmd := buildxCmd (sb , withArgs ("build" , "--label" , "=TEST_STRING" , dir ))
0 commit comments