fix: bad command spliting

This commit is contained in:
2023-12-28 00:10:11 +02:00
parent fb70e1f4b9
commit fdde504d9f
3 changed files with 19 additions and 7 deletions

View File

@@ -1,3 +1,16 @@
## 0.5.1
- Fix bad command spliting in some cases
- Less restrictive dependencies (compatible with Flutter stable)
## 0.5.1
- Use unlocked dependencies
## 0.5.0
- Updated dependencies
## 0.4.0
- Colorized help output

View File

@@ -90,9 +90,8 @@ class RunnableScript {
}) {
final name = map['name'] as String;
final rawCmd = map['cmd'] as String;
final cmd = rawCmd.split(' ').first;
final cmd = rawCmd;
final rawArgs = (map['args'] as List<String>?) ?? [];
final cmdArgs = _utils.splitArgs(rawCmd.substring(cmd.length));
final description = map['description'] as String?;
final suppressHeaderText = map['suppress_header_output'] as bool? ?? false;
final appendNewline = map['append_newline'] as bool? ?? false;
@@ -102,7 +101,7 @@ class RunnableScript {
return RunnableScript(
name,
cmd: cmd,
args: cmdArgs + List<String>.from(rawArgs),
args: List<String>.from(rawArgs),
fileSystem: fileSystem,
description: description,
suppressHeaderOutput: suppressHeaderText,

View File

@@ -1,16 +1,16 @@
name: script_runner
description: Run all your project-related scripts in a portable, simple config.
version: 0.4.0
version: 0.5.1
homepage: https://casraf.dev/
repository: https://github.com/chenasraf/dart_script_runner
license: MIT
environment:
sdk: '>=2.17.0 <4.0.0'
sdk: '>=3.2.2 <4.0.0'
dependencies:
file: ^7.0.0
path: ^1.8.2
yaml: ^3.1.1
path: '>=1.8.0 <2.0.0'
yaml: ^3.1.2
dev_dependencies:
lints: