AlShevelev / power_shell_logcat

MIT License
4 stars 0 forks source link

enable adb install from chocolatey / from .exe #2

Open gogo2464 opened 3 months ago

gogo2464 commented 3 months ago

Hello, I had to make change to the code to enable the usage from adb installed not locally. Check out my diff:

git diff

diff --git a/log.ps1 b/log.ps1
index f663f22..2a01bb2 100644
--- a/log.ps1
+++ b/log.ps1
@@ -149,7 +149,7 @@ if($invalidArg) {
 <#
  A call contruction
 #>
-$processIdStr = (./adb shell pidof $argIdValue) | Out-String
+$processIdStr = (adb shell pidof $argIdValue) | Out-String
 if($processIdStr -eq '') {
        Show-Selected("Process not found")
        exit
@@ -175,4 +175,4 @@ if($argTagValue -ne '') {
        $tagAndFilterKey = "${argTagValue}:${filterKey} *:S"
 }

-iex "./adb logcat --pid=$processId $tagAndFilterKey $colorKey $fileKey"
\ No newline at end of file
+iex "adb logcat --pid=$processId $tagAndFilterKey $colorKey $fileKey"
\ No newline at end of file