rsm-hcd / AndcultureCode.Cli

and-cli command-line tool to manage the development of software applications
https://andculture.com
Apache License 2.0
14 stars 15 forks source link

Update dotnet-kill to use cross-platform 'ps' and 'kill' commands #69

Closed brandongregoryscott closed 4 years ago

brandongregoryscott commented 4 years ago

Fixes issue #63

Add 'ps' module for wrapping 'fkill' and 'ps-list' packages, update dotnet-kill module to call ps.list and ps.kill, add associated tests

Tested on Mac OS 10.15.5, Ubuntu 18.04.3, and Windows 10 Pro Build 18363.836

codecov[bot] commented 4 years ago

Codecov Report

Merging #69 into master will increase coverage by 3.65%. The diff coverage is 97.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #69      +/-   ##
==========================================
+ Coverage   73.52%   77.18%   +3.65%     
==========================================
  Files          16       18       +2     
  Lines         476      504      +28     
  Branches       74       71       -3     
==========================================
+ Hits          350      389      +39     
+ Misses        105       97       -8     
+ Partials       21       18       -3     
Impacted Files Coverage Δ
_modules/dotnet-kill.js 95.83% <95.83%> (ø)
_modules/formatters.js 100.00% <100.00%> (+48.00%) :arrow_up:
_modules/ps.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 10efb38...87e353a. Read the comment docs.

brandongregoryscott commented 4 years ago

Thanks for taking a look @wintondeshong! I'll test this out again. I could've sworn it was killing my dotnet instance even when it was being run thru the and-cli. I'll double check to see what's going on there before I merge anything - admittedly I was testing this more on my Mac, since that's where the problem initially arose, but I'm seeing the same behavior as you on Windows.

brandongregoryscott commented 4 years ago

So weird. I'm testing it again on Windows, without any code changes - and it's working as expected. I thought maybe it was the difference of calling the and-cli-dev alias to spawn dotnet vs. my current globally installed version and-cli, and that wasn't it. Thought maybe it was due to having the VS Code terminal open as administrator, or Cmder open as administrator, and that doesn't seem to be the case. I'm going to keep using it for a few more days (preferring the dotnet -k vs. manually killing dotnet with ctrl+c) to see if it acts up, but I'm not sure how I got into that state before.

Do you know what version of the and-cli you were running dotnet with? Was it the dev alias, the global version, or a project version?

wintondeshong commented 4 years ago

Just did a fresh clone of your branch, install, using alias (I had set up an for your fork :P and-cli-brandongregoryscott). It worked as expected 🤷‍♂️ Not sure what changed. I'll also try to use it to stop my dotnet processes I might use. Honestly, if nothing crops up in the next day or so I'd say this is good to go.