This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\Users\joris>fab test_func | |
Fabric version: 1.7.0 | |
[localhost] local: set foo | |
foo="bar" SET baz="qux" | |
[localhost] local: set baz | |
Environment variable baz not defined | |
Fatal error: local() encountered an error (return code 1) while executing 'set baz' | |
Aborting. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fabric.api import * | |
import fabric | |
import os | |
def test_func(): | |
print "Fabric version: %s" % fabric.version.get_version() | |
with shell_env(foo="bar", baz="qux"): | |
# Echo the 'foo' and 'baz' environment variables: | |
if os.name == 'posix': | |
local("env | grep foo") |
NewerOlder