mirror of
https://github.com/sbrow/ps.git
synced 2026-02-28 03:01:43 -05:00
V2.0 update
## Features ### Open * Now returns the activeDocument after opening the file. ### JSLayer() * Removed semicolon from output. ### Document * Added FullName() which returns path to the .psd file. * Changed Filename() to DumpFile(), as Filename was misleading. * Dump function now saves the file as well, to help reduce the frequency of de-syncs. * Dump function now saves json files alongside the .psds instead of in a separate data folder- encountered issues when using the package as a module in go 1.11beta2. * Added Save() ## Testing * Added TestDocument_Save * Added TestDocument_Dump ## Misc. * Renamed pkgpath to pkgPath, to better fit go's standards. ## Fixes * DoAction now runs correctly.
This commit is contained in:
@@ -51,7 +51,10 @@ func Run(name string, args ...string) ([]byte, error) {
|
||||
cmd := exec.Command(std.Cmd, parseArgs(name, args...)...)
|
||||
cmd.Stdout, cmd.Stderr = &out, &errs
|
||||
if err := cmd.Run(); err != nil || len(errs.Bytes()) != 0 {
|
||||
return out.Bytes(), fmt.Errorf("err: \"%s %s\"\nargs: \"%s\"\nout: \"%s\"", err, errs.String(), args, out.String())
|
||||
return out.Bytes(), fmt.Errorf(`err: "%s"
|
||||
errs.String(): "%s"
|
||||
args: "%s"
|
||||
out: "%s"`, err, errs.String(), args, out.String())
|
||||
}
|
||||
return out.Bytes(), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user