Closed ZevEisenberg closed 7 years ago
Hi @ZevEisenberg! Great to hear from you again. Right now you'll have to wire this up yourself as there isn't a built in way to detect this. Let me know how it goes and if you uncover anything. Thanks!
-FASTLANE_SNAPSHOT YES
is always present in launch_arguments
. It is added by the SnapshotHelper.swift
@Ashton-W Thanks for linking this to your PR! I'll make sure the team takes a look 👍
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest fastlane
version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:
Pretty sure this is 👍 now.
@ZevEisenberg Thanks! Hope you have a great week :+1:
New Issue Checklist
Issue Description
When running
snapshot
, you can determine whether you are capturing snapshots at run time usingI would also like to detect whether I'm currently capturing snapshots in a script in a build phase. I tried checking the value of
$FASTLANE_SNAPSHOT
, but it's always empty. Is there a supported way to do this?In the following output, my screenshot tests are failing because I'm force-unwrapping a
UIImage?
that is not actually in the app bundle. I'm trying to move it in with a build script, but only when usingsnapshot
, hence my need to detect that state.Complete output when running fastlane, including the stack trace and command used
^ the output has triple backpacks here, so it chops up the fenced code block (or, it did, until I inserted this interlude). Is that intentional?
Configuration Files
Please copy the complete content of your
Fastfile
and any other configuration files you use below:Currently using
snapshot
only, notfastlane
as a whole. That comes next. Here's myspapfile
. You can see another attempt I made at passing launch variables in thelaunch_arguments
line, but I've got the feeling I'm misusing that parameter.Environment
fastlane version (run
fastlane -v
): fastlane 1.81.0snapshot version (run
snapshot -v
): snapshot 1.12.1Do you use bundler to execute fastlane (i.e.
bundle exec fastlane
)? YesDo you use a Ruby environment manager (e.g.
chruby
,rbenv
,rvm
)? yes