Sibasis Padhi
7dd9fde7ce
fix: normalize paths to prevent concatenation on Windows
...
Fixes #5673
On Windows, when using absolute paths like C:\path\to\dir,
the path could be incorrectly concatenated, resulting in:
C:\working\dir\C:\path\to\dir\file
This fix applies filepath.Abs() and filepath.Clean() to normalize
the path before using it, ensuring absolute paths are handled
correctly on all platforms.
Changes:
- Apply filepath.Abs() to convert relative paths to absolute
- Apply filepath.Clean() to remove redundant separators and resolve ..
- Add tests for absolute paths, complex paths with .., and paths
with redundant separators to verify normalization works correctly
The tests use actual 'flux build kustomization' commands with:
1. Absolute paths (prevents concatenation bugs)
2. Paths with parent directory (..) references
3. Paths with redundant separators (//)
All tests verify the command produces correct output, ensuring
the path normalization fix works as expected.
Signed-off-by: Sibasis Padhi <sibasis.padhi@gmail.com >
2026-01-13 10:25:59 -06:00
..
2025-11-21 17:46:12 +05:30
2023-12-08 21:16:54 +05:30
2023-12-08 21:16:54 +05:30
2025-09-16 11:00:12 +03:00
2024-09-27 19:54:11 +03:00
2024-09-27 19:54:11 +03:00
2024-09-27 19:54:11 +03:00
2024-09-27 19:54:11 +03:00
2025-06-04 11:21:11 +02:00
2025-09-15 23:59:03 +03:00
2023-02-15 13:22:44 +01:00
2025-05-27 16:53:47 +01:00
2026-01-13 10:25:59 -06:00
2026-01-13 10:25:59 -06:00
2023-04-05 16:05:21 +03:00
2023-04-05 16:05:21 +03:00
2025-09-24 10:39:53 +03:00
2024-01-30 14:07:35 +02:00
2023-12-06 15:21:55 +01:00
2023-04-05 16:05:21 +03:00
2023-04-05 16:05:21 +03:00
2023-04-05 16:05:21 +03:00
2023-04-05 16:05:21 +03:00
2023-04-05 16:05:21 +03:00
2023-12-08 21:16:54 +05:30
2023-12-08 21:16:54 +05:30
2025-12-10 22:08:31 +01:00
2025-12-10 22:08:31 +01:00
2025-09-20 00:00:10 -03:00
2025-09-15 13:34:32 +01:00
2025-09-16 12:08:15 +01:00
2023-04-05 16:05:21 +03:00
2025-09-25 18:22:08 +03:00
2023-12-08 19:47:12 +05:30
2023-08-23 14:44:09 +05:30
2025-07-29 22:50:56 +09:00
2025-07-29 22:50:56 +09:00
2025-02-13 11:36:24 -08:00
2022-08-09 12:44:59 +03:00
2025-07-29 22:50:56 +09:00
2024-09-05 22:22:47 +10:00
2025-07-29 22:50:56 +09:00
2022-08-09 12:44:59 +03:00
2025-07-29 22:50:56 +09:00
2024-09-27 19:11:10 +03:00
2025-07-29 22:50:56 +09:00
2024-09-27 19:54:11 +03:00
2025-07-29 22:50:56 +09:00
2023-04-05 16:05:21 +03:00
2025-09-16 11:00:12 +03:00
2024-05-09 11:57:38 +02:00
2024-05-09 11:57:38 +02:00
2025-09-15 17:33:20 +01:00
2025-09-16 11:00:12 +03:00
2022-06-01 15:59:52 +02:00
2025-09-16 11:00:12 +03:00
2024-04-17 09:45:33 +02:00
2025-05-28 15:12:17 +03:00
2023-04-05 16:05:21 +03:00
2025-11-21 17:46:12 +05:30
2025-11-21 17:46:12 +05:30
2022-02-16 10:51:03 +01:00
2025-01-12 14:09:24 +00:00
2025-09-04 12:44:28 +00:00
2025-09-26 10:01:31 +01:00
2025-09-26 10:01:31 +01:00
2025-09-26 10:01:31 +01:00
2024-12-11 11:41:27 +02:00
2023-12-08 21:16:54 +05:30
2023-12-08 21:16:54 +05:30
2024-05-09 17:18:11 +03:00
2025-09-15 13:34:32 +01:00
2025-09-15 13:34:32 +01:00
2025-09-16 12:08:15 +01:00
2023-04-05 16:05:21 +03:00
2023-04-05 16:05:21 +03:00
2023-04-05 16:05:21 +03:00
2024-09-27 17:01:21 +03:00
2025-05-28 15:12:17 +03:00
2023-04-05 16:05:21 +03:00
2024-05-06 15:43:10 +03:00
2025-05-28 15:12:17 +03:00
2023-04-05 16:05:21 +03:00
2023-04-05 16:05:21 +03:00
2025-04-28 15:02:33 +03:00
2025-10-01 09:37:35 +01:00
2025-06-13 15:15:47 +09:00
2024-12-09 12:21:52 +02:00
2023-04-05 16:05:21 +03:00
2022-09-06 15:20:42 +02:00
2024-04-08 17:54:38 +03:00
2024-04-08 17:54:38 +03:00
2025-09-15 13:34:32 +01:00
2025-09-16 12:08:15 +01:00
2023-12-08 21:16:54 +05:30
2023-12-08 21:16:54 +05:30
2025-09-16 11:00:12 +03:00
2025-09-16 11:00:12 +03:00
2024-05-09 17:18:11 +03:00
2025-09-15 13:34:32 +01:00
2025-09-15 13:34:32 +01:00
2025-09-16 12:08:15 +01:00
2023-04-05 16:05:21 +03:00
2023-04-05 16:05:21 +03:00
2023-04-05 16:05:21 +03:00
2023-10-17 14:08:09 +02:00
2024-09-27 17:01:21 +03:00
2024-05-09 11:57:38 +02:00
2025-10-24 14:52:36 -03:00
2023-04-05 16:05:21 +03:00
2024-05-06 12:50:22 +03:00
2025-05-28 15:12:17 +03:00
2023-04-05 16:05:21 +03:00
2025-10-24 14:52:36 -03:00
2025-09-16 11:00:12 +03:00
2023-12-08 21:16:54 +05:30
2023-12-08 21:16:54 +05:30
2025-04-28 15:02:33 +03:00
2025-09-16 11:00:12 +03:00
2025-09-16 11:00:12 +03:00
2024-05-09 17:18:11 +03:00
2025-09-16 12:08:15 +01:00
2025-09-15 13:34:32 +01:00
2025-09-15 13:34:32 +01:00
2025-09-16 12:08:15 +01:00
2023-04-05 16:05:21 +03:00
2023-10-17 14:07:58 +02:00
2023-10-17 14:07:58 +02:00
2025-10-09 08:45:01 -03:00
2024-09-27 17:01:21 +03:00
2024-05-06 12:50:22 +03:00
2025-10-09 08:45:01 -03:00
2023-10-17 14:07:58 +02:00
2024-05-06 12:50:22 +03:00
2025-05-28 15:12:17 +03:00
2023-04-05 16:05:21 +03:00
2025-05-07 19:11:16 -03:00
2025-05-07 19:11:16 -03:00
2023-03-09 11:43:05 +01:00
2024-05-09 17:18:11 +03:00
2025-09-20 00:00:10 -03:00
2025-09-20 00:00:10 -03:00
2025-09-15 23:59:03 +03:00
2025-09-16 11:00:12 +03:00
2023-06-29 08:23:13 +02:00
2023-04-05 16:05:20 +03:00
2025-10-01 09:37:35 +01:00
2023-04-05 16:05:21 +03:00
2021-04-08 10:48:27 +03:00
2023-10-17 14:08:10 +02:00
2023-06-05 10:07:38 +02:00
2024-06-11 23:56:04 +02:00
2023-12-08 19:47:12 +05:30
2025-09-15 23:59:03 +03:00
2023-12-08 19:47:12 +05:30
2025-10-13 20:21:49 +05:30
2021-10-14 16:14:28 +03:00
2025-10-04 14:26:54 +01:00
2025-10-04 14:26:54 +01:00
2023-06-29 08:23:13 +02:00
2025-10-01 09:37:35 +01:00
2025-10-01 09:37:35 +01:00
2023-04-05 16:05:21 +03:00
2025-10-01 09:37:35 +01:00
2023-04-05 16:05:21 +03:00
2023-12-08 19:47:12 +05:30
2025-04-28 15:02:33 +03:00
2023-04-05 16:05:20 +03:00
2025-11-17 13:31:13 +00:00
2025-09-20 00:00:10 -03:00
2025-09-15 13:34:32 +01:00
2025-09-16 12:08:15 +01:00
2023-04-05 16:05:21 +03:00
2025-11-17 13:31:13 +00:00
2023-12-08 21:15:20 +05:30
2024-09-27 17:01:21 +03:00
2025-11-17 13:31:13 +00:00
2023-12-08 21:15:20 +05:30
2024-05-06 12:28:34 +03:00
2025-05-28 15:12:17 +03:00
2023-04-05 16:05:21 +03:00
2025-11-17 13:31:13 +00:00
2025-04-28 15:02:33 +03:00
2023-12-08 21:16:54 +05:30
2023-12-08 21:16:54 +05:30
2024-05-09 17:18:11 +03:00
2025-09-20 00:00:10 -03:00
2025-09-15 13:34:32 +01:00
2025-09-16 12:08:15 +01:00
2023-04-05 16:05:21 +03:00
2023-06-29 12:50:38 +05:30
2023-06-29 12:50:38 +05:30
2024-09-27 17:01:21 +03:00
2024-05-06 12:28:34 +03:00
2023-06-29 12:50:38 +05:30
2024-05-06 12:28:34 +03:00
2025-05-28 15:12:17 +03:00
2023-04-05 16:05:21 +03:00
2025-04-28 15:02:33 +03:00
2023-03-09 11:43:05 +01:00
2025-10-09 08:45:01 -03:00
2025-09-16 12:08:15 +01:00
2023-12-08 19:47:12 +05:30
2023-12-08 21:16:54 +05:30
2023-12-08 21:16:54 +05:30
2024-05-09 17:18:11 +03:00
2025-09-20 00:00:10 -03:00
2025-09-15 13:34:32 +01:00
2025-09-16 12:08:15 +01:00
2023-04-05 16:05:21 +03:00
2023-06-29 12:50:38 +05:30
2023-06-29 12:50:38 +05:30
2024-09-27 17:01:21 +03:00
2024-05-06 12:28:34 +03:00
2023-06-29 12:50:38 +05:30
2024-05-06 12:28:34 +03:00
2025-05-28 15:12:17 +03:00
2023-04-05 16:05:21 +03:00
2023-06-29 08:23:13 +02:00
2025-10-01 09:37:35 +01:00
2023-04-05 16:05:21 +03:00
2025-05-14 18:02:18 +02:00
2025-09-23 15:49:19 +03:00
2025-09-16 11:00:17 +03:00
2025-09-16 11:00:17 +03:00
2022-01-10 16:30:38 +01:00
2024-05-09 17:10:00 +03:00
2023-04-05 16:05:21 +03:00
2024-01-21 13:06:59 -06:00
2023-08-22 12:36:58 +03:00
2022-01-10 16:30:38 +01:00
2023-04-05 16:05:21 +03:00
2023-12-06 15:21:55 +01:00