I think, you cannot: The manifest is first compiled on Puppet Master and then the catalog (complied manifests) is sent to the agent, where that command actually runs. You can try this instead to see if you get any thing better
command => '/pathToShellScript/myScript.sh 2>&1', > > logoutput => true, > > Best! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/3c611f20-e087-42ef-8edd-e8d20d0acc82%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.