microsoft / botframework-cli

CLI Tools for the Microsoft Bot Framework
Other
176 stars 129 forks source link

piping doesn't work in PowerShell using npm 6.11+ #249

Closed christopheranderson closed 1 month ago

christopheranderson commented 5 years ago

Problem

Piping between commands doesn't work in PowerShell.

Repro:

bf qnamaker:export:kb --kbId <id> --subscriptionKey <key> --environment Test | bf qnamaker:convert

npm 6.12, node 12

Investigation

npm i -g @microsoft/botframework-cli creates a .ps1 and cmd file.

In Powershell, it resolves the ps1 file

When piping between ps1 files, it returns an Array of strings, rather than a single string blob, which causes an error message from qnamaker:convert.

This looks like it was introduced in npm 6.11.

Workarounds

sgellock commented 5 years ago

@munozemilio @christopheranderson if we can get this in for 4.6, then so be it. if not, we can push a patch release out shortly there after. I won't hold the release for this. labeling it P1

christopheranderson commented 5 years ago

Agreed, @sgellock. @munozemilio and I are working with someone from the PowerShell team right now to understand what the problem is, then I'll work with the DevDiv JS folks to see if we can get a fix understood with npm. That might be something on our end, or it might be an npm fix.

munozemilio commented 4 years ago

@christopheranderson did you hear back from PS team?

christopheranderson commented 4 years ago

I'm booking some time with the PS team next week to come up with a proposed fix we can attempt to contribute back to npm.