Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While trying to use aya-digit I noticed that
"model.json" json.load
fails on windows.I've used
FileUtils.resolveFile
where it seemed appropriate. (relates to #93 )I initially thought this fix only applied to windows, but after testing on Ubuntu, it appears Aya also behaves oddly on Linux?
(Stop me if the assumptions in my tests are just plain wrong)
The primary cause of Linux weirdness seems to come from my shell having a different working directory than the one I pass to Aya.
'Actual output' indicates the behaviour I am seeing with the current Version of Aya.
'Expected output' is the behaviour using the changes of this PR.
Tests / Affected Instructions
sys.cd
,sys.mkdir
test.aya:
~/dir3$ java -jar /path/to/aya.jar /path/to/test /path/to/test/test.aya
Expected new directories:
/path/to/test/dir1/dir2
Actual new directories:
~/dir3/dir1
~/dir3/dir2
sys.set_ad
,sys.readdir
test.aya
~/dir3$ java -jar /path/to/aya.jar /path/to/test /path/to/test/test.aya
Expected output:
/path/to/
/path/
Actual output:
~/dir3
~/dir3
fstream.O
test.aya
~/dir3$ echo "{\"hello\":123,\"world\":456}" > /path/to/test/data.json
~/dir3$ java -jar /path/to/aya.jar /path/to/test /path/to/test/test.aya
Expected output:
11 "{\"hello\":123,\"world\":456}"
Actual output:
0 0
(failed to read file)image.read
andimage.write
test.aya
echo "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAIAAACQd1PeAAAADElEQVQI12NQWqIJAAHbAPCVVqDlAAAAAElFTkSuQmCC" | base64 -d > /path/to/test/in.png
~/dir3$ java -jar /path/to/aya.jar /path/to/test /path/to/test/test.aya
Expected output:
and
/path/to/test/out.png
is created.Actual output: