dataplat / docs

The documentation for dbatools module. Issues with command doc and bugs should be reported to dataplat/dbatools.
https://docs.dbatools.io
15 stars 12 forks source link

Report if a command is not supported on Mac / Linux #17

Closed potatoqualitee closed 5 years ago

potatoqualitee commented 5 years ago

I'll be adding this to the commands that cant support linux like the Performance Monitoring commands. The code is if (Test-NotWindows) { return }

Can that be added to json and thus docs somehow?

wsmelton commented 5 years ago

Would it not be better to just not have the command load as a function on non windows?

Seem to recall that is how some other modules did.

wsmelton commented 5 years ago

I think it is easier to control the list in the psm1 or say create a json file of the command for Windows. Then on import just have those excluded as exported function.

potatoqualitee commented 5 years ago

that wouldn't address our docs issue, and as an end-user, i would like to know that it is not supported, instead of it not existing. i wish there was a BeforeAll equivalent of a Module, it'd be nice not to have to add this to every command, but to a list.

wsmelton commented 5 years ago

For docs we just have to maintain a list. Having to add code just to validate if a command should be used does not seem proper to me.

SqlServer module I recall has setup where they won't load all commands on non-windows.

Other option just off the top is folder structure. If windows based commands are in one folder?

potatoqualitee commented 5 years ago

hmmmmmmmmmmmmmmmmmmmmmmmmm maybe a list can do mmmm

niphlod commented 5 years ago

surely it's more a problem for dbatools's structure than docs. when we're set with the module, we can see what's the best way to report the info back on find-dbacommand and docs.dbatools.io.

niphlod commented 5 years ago

note to self

so Platform: Windows, Linux, macOS for 250ish and Platform: Windows only for the remainder

$script:noncoresmo is Windows only

niphlod commented 5 years ago

once https://github.com/sqlcollaborative/dbatools/pull/4807 is in, this can be closed.