You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(README): Add configuration instructions for sudo password
- Include instructions for configuring sudo password to avoid errors when running soar commands.
- Provide steps to edit the sudoers file for passwordless execution of soar commands on macOS.
Signed-off-by: guanguans <ityaozm@gmail.com>
Copy file name to clipboardExpand all lines: README.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -505,10 +505,28 @@ array:9 [
505
505
<details>
506
506
<summary><b>:warning: When running in a unix OS non-cli environment, may throw `Fatal error: ...Exit Code: 2(Misuse of shell builtins)...`</b></summary>
507
507
508
+
### Configure sudo password
509
+
508
510
```php
509
511
// Fatal error: Uncaught Symfony\Component\Process\Exception\ProcessFailedException: The command "'/Users/yaozm/Documents/develop/soar-php/bin/soar.darwin-arm64' '-report-type=json' '-query=SELECT * FROM `foo`;'" failed. Exit Code: 2(Misuse of shell builtins) Working directory: /Users/yaozm/Documents/develop/soar-php Output: ================ Error Output: ================ panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x104d22798] goroutine 1 [running]: github.com/pingcap/tidb/util/memory.MemTotalNormal() pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20210601085537-5d7c852770eb/util/memory/meminfo.go:41 +0x68 github.com/pingcap/tidb/util/memory.init.0() pkg/mod/github.com/pingcap/tidb@v1.1.0-beta.0.20210601085537-5d7c852770eb/util/memory/meminfo.go:134 +0x184 in /Users/yaozm/Documents/develop/soar-php/vendor/symfony/process/Process.php:273
510
512
$soar->withSudoPassword('your sudo password'); // With a sudo password to run the soar command with sudo to avoid the above errors.
511
513
```
514
+
515
+
### Or configure sudoers
516
+
517
+
> On higher versions of macOS, it is possible that the fingerprint authentication window will pop up. You can configure sudoers to run `soar` commands without a password.
518
+
519
+
1. Edit Configuration file of sudoers:
520
+
521
+
```shell
522
+
sudo visudo
523
+
```
524
+
525
+
2. Add rule [`{user name} ALL=(ALL) NOPASSWD: {soar binary(You can find it from the exception message.)}`]:
0 commit comments