• Brandon Turner's avatar
    Fix chroot builder to work with chef-solo · b2258dc4
    Brandon Turner authored
    According to be5adb92, the UploadDir
    method supports two ways of copying depending on whether a trailing
    slash is used:
        src = "dir"  -> dest/dir
        src = "dir/" -> dest
    
    On BSD-based systems (such as OSX, FreeBSD, etc.) the `cp -R` command
    handles these two cases automatically.  However, Linux treats "src/" and
    "src" the same.
    
    To support the trailing slash syntax portably, we can use:
        src = "dir"   -> dest/dir
        src = "dir/." -> dest
    
    This works on BSD and Linux.  It is better than using wildcards as it
    grabs hidden files as well.
    
    This fixes #1196 that prevents the chef-solo provisioner from working
    with the chroot builder.
    b2258dc4
communicator.go 3.02 KB