From a6e84f7d2c1d5fdc65901fce683502be3f47833f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20Sj=C3=B6din?= <42916532+ilittlebig@users.noreply.github.com> Date: Sat, 30 Nov 2024 22:04:48 +0100 Subject: [PATCH] fix(api.js): wrong command for isAbsolute (#11835) --- .changes/path-plugin-is-absolute.md | 5 +++++ packages/api/src/path.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changes/path-plugin-is-absolute.md diff --git a/.changes/path-plugin-is-absolute.md b/.changes/path-plugin-is-absolute.md new file mode 100644 index 000000000..c0a8a69a5 --- /dev/null +++ b/.changes/path-plugin-is-absolute.md @@ -0,0 +1,5 @@ +--- +"@tauri-apps/api": "patch:bug" +--- + +Fix error where using `isAbsolute` would return `Command not found`. diff --git a/packages/api/src/path.ts b/packages/api/src/path.ts index 9e8e5e034..ec90dfaea 100644 --- a/packages/api/src/path.ts +++ b/packages/api/src/path.ts @@ -661,7 +661,7 @@ async function basename(path: string, ext?: string): Promise { * @since 1.0.0 */ async function isAbsolute(path: string): Promise { - return invoke('plugin:path|isAbsolute', { path }) + return invoke('plugin:path|is_absolute', { path }) } export {