Skip to content

Commit 0c087f0

Browse files
dschoGit for Windows Build Agent
authored andcommitted
Merge branch 'deprecate-old-runtime-prefix-path-interpolation'
Previously, we interpolated paths in config variables that start with a forward-slash as relative to the runtime prefix. This was not portable and has been replaced with `%(prefix)/`. Let's warn users when they use the now-deprecated form. Signed-off-by: Johannes Schindelin <[email protected]>
2 parents ee80e51 + 24e60be commit 0c087f0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

path.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,12 @@ char *interpolate_path(const char *path, int real_home)
746746
if (skip_prefix(path, "%(prefix)/", &path))
747747
return system_path(path);
748748

749+
#ifdef __MINGW32__
750+
if (path[0] == '/') {
751+
warning(_("encountered old-style '%s' that should be '%%(prefix)/%s'"), path, path);
752+
return system_path(path + 1);
753+
}
754+
#endif
749755
if (path[0] == '~') {
750756
const char *first_slash = strchrnul(path, '/');
751757
const char *username = path + 1;

0 commit comments

Comments
 (0)