| Copyright 2020 The Monogon Project Authors. |
| |
| Licensed under the Apache License, Version 2.0 (the "License"); |
| you may not use this file except in compliance with the License. |
| You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| |
| |
| From d73ca1c4da53336442d2d256e70ce2acc45e4275 Mon Sep 17 00:00:00 2001 |
| From: Mostyn Bramley-Moore <mostynb@vewd.com> |
| Date: Thu, 17 Oct 2019 14:00:18 +0200 |
| Subject: [PATCH] avoid unexpected keyword error by using positional parameters |
| |
| This avoids the following error, when building with bazel 1.0: |
| ... |
| File "/home/user/kubernetes/build/code_generation.bzl", line 44, in go_pkg |
| pkg.replace("staging/src/", "vendor/", maxsplit ...) |
| unexpected keyword 'maxsplit', for call to method replace(old, new, maxsplit = None) of 'string' |
| |
| Fixes #81382 |
| --- |
| build/code_generation.bzl | 2 +- |
| 1 file changed, 1 insertion(+), 1 deletion(-) |
| |
| diff --git a/build/code_generation.bzl b/build/code_generation.bzl |
| index eed223eb86..6feef4ba6e 100644 |
| --- a/build/code_generation.bzl |
| +++ b/build/code_generation.bzl |
| @@ -41,7 +41,7 @@ def go_pkg(pkg): |
| ... |
| ) |
| """ |
| - return go_prefix + "/" + pkg.replace("staging/src/", "vendor/", maxsplit = 1) |
| + return go_prefix + "/" + pkg.replace("staging/src/", "vendor/", 1) |
| |
| def openapi_deps(): |
| deps = [ |
| -- |
| 2.20.1 |
| |