diff --git a/acceptance/tests/environment/enc_nonexistent_directory_environment.rb b/acceptance/tests/environment/enc_nonexistent_directory_environment.rb
index <HASH>..<HASH> 100644
--- a/acceptance/tests/environment/enc_nonexistent_directory_environment.rb
+++ b/acceptance/tests/environment/enc_nonexistent_directory_environment.rb
@@ -38,8 +38,8 @@ master_opts = {
 
 with_puppet_running_on master, master_opts, testdir do
   agents.each do |agent|
-    on(agent, puppet("agent --no-daemonize --onetime --server #{master} --verbose")) do
-      assert_match(/Could not find a directory environment named 'doesnotexist'/, stderr, "Errors when nonexistant environment is specified")
+    on(agent, puppet("agent -t --server #{master}"), :acceptable_exit_codes => [1]) do
+      assert_match(/Could not find a directory environment named 'doesnotexist'/, stderr, "Errors when nonexistent environment is specified")
       assert_not_match(/In the production environment/, stdout, "Executed manifest from production environment")
     end
   end
(maint) Fix acceptance test using cached catalog

The enc_nonexistent_directory_environment.rb was failing when it
attempted to run but was using a cached catalog instead of failing
without running a catalog like the test had intended.

This commit uses the -t command on the agent run instead of using all of
the flags that were being used.